]> git.mjollnir.org Git - moodle.git/commitdiff
accesslib: has_capability() - fix warnings about FULLME constant
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:21:23 +0000 (07:21 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:21:23 +0000 (07:21 +0000)
lib/accesslib.php

index aeb2bcadfd439d94611f9e22b4861081b5893a1c..23446ea6b6f28d1244af31fe623cf12382db48f9 100755 (executable)
@@ -421,7 +421,7 @@ function has_capability($capability, $context=NULL, $userid=NULL, $doanything=tr
         load_all_capabilities();
     }
 
-    if (FULLME === 'cron' && !isset($USER->access)) {
+    if (defined('FULLME') && FULLME === 'cron' && !isset($USER->access)) {
         //
         // In cron, some modules setup a 'fake' $USER,
         // ensure we load the appropriate accessdata.