diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 210157043cf..a04b1d75676 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -5363,7 +5363,6 @@ function get_string($identifier, $module='', $a=NULL, $extralocations=NULL) { } else { $locations[] = $CFG->dataroot.'/lang/'; $locations[] = $CFG->dirroot.'/lang/'; - $locations[] = $CFG->dirroot.'/local/lang/'; } /// Add extra places to look for strings for particular plugin types. @@ -5380,7 +5379,9 @@ function get_string($identifier, $module='', $a=NULL, $extralocations=NULL) { $type = substr($module, 0, $dividerpos + 1); $plugin = substr($module, $dividerpos + 1); } - if (!empty($rules[$type])) { + if ($module == 'local') { + $locations[] = $CFG->dirroot . '/local/lang/'; + } if (!empty($rules[$type])) { foreach ($rules[$type] as $location) { $locations[] = $CFG->dirroot . "/$location/$plugin/lang/"; }