From: skodak Date: Sun, 3 Feb 2008 12:53:33 +0000 (+0000) Subject: MDL-13312 fixed notices caused by previous commit, patch by Gary Anderson; merged... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7f30b5fc2c07095f6b7162183b8f506d2afec222;p=moodle.git MDL-13312 fixed notices caused by previous commit, patch by Gary Anderson; merged from MOODLE_19_STABLE --- diff --git a/lib/weblib.php b/lib/weblib.php index 90cefab296..03a11225e5 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -1463,7 +1463,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL $time = time() - $CFG->cachetext; $md5key = md5($text.'-'.(int)$courseid.'-'.current_language().'-'.(int)$format.(int)$options->trusttext.(int)$options->noclean.(int)$options->smiley.(int)$options->filter.(int)$options->para.(int)$options->newlines); - if (FULLME == 'cron') { + if (defined('FULLME') and FULLME == 'cron') { if (isset($croncache[$md5key])) { return $croncache[$md5key]; } @@ -1471,7 +1471,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL if ($oldcacheitem = get_record_sql('SELECT * FROM '.$CFG->prefix.'cache_text WHERE md5key = \''.$md5key.'\'', true)) { if ($oldcacheitem->timemodified >= $time) { - if (FULLME == 'cron') { + if (defined('FULLME') and FULLME == 'cron') { if (count($croncache) > 150) { array_shift($croncache); } @@ -1557,7 +1557,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL } if (empty($options->nocache) and !empty($CFG->cachetext) and $CFG->currenttextiscacheable) { - if (FULLME == 'cron') { + if (defined('FULLME') and FULLME == 'cron') { // special static cron cache - no need to store it in db if its not already there if (count($croncache) > 150) { array_shift($croncache);