Permalink
Browse files

MDL-26914 fix undefined CFG langcache property during install

  • Loading branch information...
1 parent 62f7ce7 commit 5f27855ea4eb0dd4a0fee44e03fe1a5caff5e786 @skodak skodak committed Apr 6, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/moodlelib.php
View
@@ -6049,7 +6049,7 @@ public function get_list_of_translations($returnall = false) {
$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 @@ public function get_list_of_translations($returnall = false) {
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));

0 comments on commit 5f27855

Please sign in to comment.