]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
Fix php-admin to work when topdir contains a symlink (e.g. on Mac)
authorBen Schmidt <none@none>
Sun, 17 Oct 2010 22:59:24 +0000 (09:59 +1100)
committerBen Schmidt <none@none>
Sun, 17 Oct 2010 22:59:24 +0000 (09:59 +1100)
ChangeLog
contrib/web/php-admin/htdocs/edit.php
contrib/web/php-admin/htdocs/save.php

index 6edfbfbedf7002ec63defee1381522e42f14e913..1ca492193f4c32dbf11b81dd4aba173fd194da45 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index c9faf53b0ffa8d7a0e4691f06edacc6e8f061ba5..a0d7908e324d7b868dbb0b641cb5175337da6479 100644 (file)
@@ -104,7 +104,7 @@ $list = $HTTP_GET_VARS["list"];
 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))
index fcc6466ddfe08ed28b9249623500dd36de1d7a87..75ae32a71ddb89fbd147dff3304a4edebceb6a59 100644 (file)
@@ -84,7 +84,7 @@ $list = $HTTP_POST_VARS["list"];
 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))