Fix for bug 3736 for more robustness in delaing with bad lang packs

This commit is contained in:
moodler
2005-07-12 11:35:30 +00:00
parent d23026fdf6
commit ba17c5d47c
+5 -3
View File
@@ -4696,9 +4696,11 @@ function get_list_of_languages() {
return false;
}
foreach ($langdirs as $lang) {
@include($CFG->dirroot .'/lang/'. $lang .'/moodle.php');
$languages[$lang] = $string['thislanguage'] .' ('. $lang .')';
unset($string);
if (file_exists($CFG->dirroot .'/lang/'. $lang .'/moodle.php')) {
include($CFG->dirroot .'/lang/'. $lang .'/moodle.php');
$languages[$lang] = $string['thislanguage'] .' ('. $lang .')';
unset($string);
}
}
}
if ( defined('FULLME') && FULLME === 'cron' && !empty($CFG->langcache)) {