From: martinlanghoff Date: Wed, 19 Sep 2007 07:25:37 +0000 (+0000) Subject: accesslib: Fix dirty paths checks on PHPv4 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3c2dbf376eb7b4c88ef7e739a0ac475ce75ad939;p=moodle.git accesslib: Fix dirty paths checks on PHPv4 $DIRTYPATHS and its derivatives are all arrays. Not objects. Drop the silly -> notation. --- diff --git a/lib/accesslib.php b/lib/accesslib.php index d21f70f756..f38e580027 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -327,7 +327,7 @@ function has_capability($capability, $context=NULL, $userid=NULL, $doanything=tr // Check basepath only once, when // we load the dirty contexts... - if (isset($DIRTYCONTEXTS->{$basepath})) { + if (isset($DIRTYCONTEXTS[$basepath])) { // sitewide change, dirty $clean = false; } @@ -4596,7 +4596,7 @@ function is_contextpath_clean($path, $dirty) { } // is _this_ context dirty? - if (isset($dirty->{$path})) { + if (isset($dirty[$path])) { return false; } while (preg_match('!^(/.+)/\d+$!', $path, $matches)) { @@ -4606,7 +4606,7 @@ function is_contextpath_clean($path, $dirty) { // assume caller did it already return true; } - if (isset($dirty->{$path})) { + if (isset($dirty[$path])) { return false; } }