]> git.mjollnir.org Git - moodle.git/commitdiff
Help files stored in _local language packs take precedence. Implements MDL-8089.
authormudrd8mz <mudrd8mz>
Mon, 8 Jan 2007 09:04:08 +0000 (09:04 +0000)
committermudrd8mz <mudrd8mz>
Mon, 8 Jan 2007 09:04:08 +0000 (09:04 +0000)
help.php

index 96fd8199bd4bc2130f12543ce6316456c389444f..330712ff710b80b38c0c1a6f1886f4830e6e7a04 100644 (file)
--- a/help.php
+++ b/help.php
@@ -34,6 +34,14 @@ if (!empty($file)) {
     // Get the list of parent languages.
     if (empty($forcelang)) {
         $langs = array(current_language(), get_string('parentlanguage'), 'en_utf8');  // Fallback
+        // _local language packs take precedence
+        $xlangs = array();
+        foreach ($langs as $lang) {
+            $xlangs[] = $lang . '_local';
+            $xlangs[] = $lang;
+        }
+        $langs = $xlangs;
+        unset($xlangs);
     } else {
         $langs = array($forcelang);
     }