From 2f40b60145d9c4739e3fc9394dad05fdacc00dc4 Mon Sep 17 00:00:00 2001 From: mudrd8mz Date: Sat, 10 Feb 2007 21:54:19 +0000 Subject: [PATCH] _local language packs take precedence with both forced language and non-forced language settings. Fixes reopened MDL-8089. --- help.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/help.php b/help.php index 216db38431..9ea191465b 100644 --- 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 -- 2.39.5