]> git.mjollnir.org Git - moodle.git/commitdiff
_local language packs take precedence with both forced language and non-forced langua...
authormudrd8mz <mudrd8mz>
Sat, 10 Feb 2007 21:54:19 +0000 (21:54 +0000)
committermudrd8mz <mudrd8mz>
Sat, 10 Feb 2007 21:54:19 +0000 (21:54 +0000)
Fixes reopened MDL-8089.

help.php

index 216db38431656dfa851a2d84200e8b23888b0dd4..9ea191465b315155f9228b10b0ff75415701e10e 100644 (file)
--- a/help.php
+++ b/help.php
@@ -34,19 +34,21 @@ 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) {
-            if (!empty($lang)) {
-                $xlangs[] = $lang . '_local';
-                $xlangs[] = $lang;
-            }
-        }
-        $langs = $xlangs;
-        unset($xlangs);
     } else {
         $langs = array($forcelang);
     }
+    
+    // _local language packs take precedence with both forced language and non-forced language settings
+    $xlangs = array();
+    foreach ($langs as $lang) {
+        if (!empty($lang)) {
+            $xlangs[] = $lang . '_local';
+            $xlangs[] = $lang;
+        }
+    }
+    $langs = $xlangs;
+    unset($xlangs);
+
 
 // Define possible locations for help file similar to locations for language strings
 // Note: Always retain module directory as before