Mercurial > hg > mlmmj
changeset 762: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 wrap: on
line diff
--- a/ChangeLog Mon Oct 18 09:56:38 2010 +1100 +++ b/ChangeLog Mon Oct 18 09:59:24 2010 +1100 @@ -1,3 +1,4 @@ + o Fix php-admin to work when topdir contains a symlink (e.g. on Mac) o Better techniques for locating support files in php-admin -- existing installations will need to have their conf/config.php altered to set the variable $confdir
--- a/contrib/web/php-admin/htdocs/edit.php Mon Oct 18 09:56:38 2010 +1100 +++ b/contrib/web/php-admin/htdocs/edit.php Mon Oct 18 09:59:24 2010 +1100 @@ -104,7 +104,7 @@ if(!isset($list)) die("no list specified"); -if (dirname(realpath($topdir."/".$list)) != $topdir) +if (dirname(realpath($topdir."/".$list)) != realpath($topdir)) die("list outside topdir"); if(!is_dir($topdir."/".$list))
--- a/contrib/web/php-admin/htdocs/save.php Mon Oct 18 09:56:38 2010 +1100 +++ b/contrib/web/php-admin/htdocs/save.php Mon Oct 18 09:59:24 2010 +1100 @@ -84,7 +84,7 @@ if(!isset($list)) die("no list specified"); -if (dirname(realpath($topdir."/".$list)) != $topdir) +if (dirname(realpath($topdir."/".$list)) != realpath($topdir)) die("list outside topdir"); if(!is_dir($topdir."/".$list))