From c05181937ac1fb24960bea73bee47827fd813b93 Mon Sep 17 00:00:00 2001 From: vyshane Date: Wed, 22 Mar 2006 03:16:27 +0000 Subject: [PATCH] Added $forcelang optional parameter. This is useful if we want to get help.php to display the help content in a language irrespective of the site language settings. This is needed for /admin/helpdoc.php script. This view requires previews for: 1) en_utf8 2) the current language the site is set to Without the change to /help.php, 1) is not possible. --- help.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/help.php b/help.php index 38de024358..7ef2807bab 100644 --- a/help.php +++ b/help.php @@ -19,6 +19,7 @@ $file = optional_param('file', '', PARAM_CLEAN); $text = optional_param('text', 'No text to display', PARAM_CLEAN); $module = optional_param('module', 'moodle', PARAM_ALPHAEXT); + $forcelang = optional_param('forcelang', '', PARAM_ALPHAEXT); print_header(); @@ -29,8 +30,11 @@ print_simple_box_start('center', '96%'); $helpfound = false; - $langs = array(current_language(), get_string('parentlanguage'), 'en'); // Fallback - + if (empty($forcelang)) { + $langs = array(current_language(), get_string('parentlanguage'), 'en_utf8'); // Fallback + } else { + $langs = array($forcelang); + } if (!empty($file)) { foreach ($langs as $lang) { if (empty($lang)) { -- 2.39.5