Be a bit more flexible with the extra paths (can be a string or an array)

This commit is contained in:
moodler
2006-10-02 15:15:23 +00:00
parent b53b73bdb8
commit 53d052d029
+7 -1
View File
@@ -4266,7 +4266,13 @@ function get_string($identifier, $module='', $a=NULL, $extralocations=NULL) {
$locations = array();
if (!empty($extralocations)) { // Calling code has a good idea where to look
$locations += $extralocations;
if (is_array($extralocations)) {
$locations += $extralocations;
} else if (is_string($extralocations)) {
$locations[] = $extralocations;
} else {
debugging('Bad lang path provided');
}
}
if (isset($CFG->running_installer)) {