From a805d653d1667cd577472501556dec17fb336450 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Wed, 6 Apr 2011 10:56:30 +0200 Subject: [PATCH] MDL-26804 fix undefined CFG langcache property during install Sorry, I have committed fix for this in master incorrectly with MDL-26914. --- lib/moodlelib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index ca2cd0750f0..a857b2a29e6 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -6049,7 +6049,7 @@ class core_string_manager implements string_manager { $languages = array(); - if ($CFG->langcache and is_readable($this->menucache)) { + if (!empty($CFG->langcache) and is_readable($this->menucache)) { // try to re-use the cached list of all available languages $cachedlist = json_decode(file_get_contents($this->menucache), true); @@ -6117,7 +6117,7 @@ class core_string_manager implements string_manager { unset($string); } - if ($CFG->langcache and !empty($this->menucache)) { + if (!empty($CFG->langcache) and !empty($this->menucache)) { // cache the list so that it can be used next time textlib_get_instance()->asort($languages); file_put_contents($this->menucache, json_encode($languages));