mlmmj

changeset dbb144f085a5

Fix php-admin to work when topdir contains a symlink (e.g. on Mac)
author Ben Schmidt
date Mon, 18 Oct 2010 09:59:24 +1100
parents 4bf5317e9bd7
children c7d0a386aef5
files ChangeLog contrib/web/php-admin/htdocs/edit.php contrib/web/php-admin/htdocs/save.php
diffstat 3 files changed, 3 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/ChangeLog	Mon Oct 18 09:56:38 2010 +1100
     1.2 +++ b/ChangeLog	Mon Oct 18 09:59:24 2010 +1100
     1.3 @@ -1,3 +1,4 @@
     1.4 + o Fix php-admin to work when topdir contains a symlink (e.g. on Mac)
     1.5   o Better techniques for locating support files in php-admin -- existing
     1.6     installations will need to have their conf/config.php altered to set
     1.7     the variable $confdir
     2.1 --- a/contrib/web/php-admin/htdocs/edit.php	Mon Oct 18 09:56:38 2010 +1100
     2.2 +++ b/contrib/web/php-admin/htdocs/edit.php	Mon Oct 18 09:59:24 2010 +1100
     2.3 @@ -104,7 +104,7 @@
     2.4  if(!isset($list))
     2.5  die("no list specified");
     2.6  
     2.7 -if (dirname(realpath($topdir."/".$list)) != $topdir)
     2.8 +if (dirname(realpath($topdir."/".$list)) != realpath($topdir))
     2.9  die("list outside topdir");
    2.10  
    2.11  if(!is_dir($topdir."/".$list))
     3.1 --- a/contrib/web/php-admin/htdocs/save.php	Mon Oct 18 09:56:38 2010 +1100
     3.2 +++ b/contrib/web/php-admin/htdocs/save.php	Mon Oct 18 09:59:24 2010 +1100
     3.3 @@ -84,7 +84,7 @@
     3.4  if(!isset($list))
     3.5  die("no list specified");
     3.6  
     3.7 -if (dirname(realpath($topdir."/".$list)) != $topdir)
     3.8 +if (dirname(realpath($topdir."/".$list)) != realpath($topdir))
     3.9  die("list outside topdir");
    3.10  
    3.11  if(!is_dir($topdir."/".$list))