From df206ef87fbf0458d157c93dbf3835276fe59a18 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 24 Sep 2006 12:07:44 +0000 Subject: [PATCH] Corrected accidental language-changing because of lang in POST --- lib/setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/setup.php b/lib/setup.php index 517164ea02..c28c8236a3 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -532,7 +532,7 @@ $CFG->os = PHP_OS; /// in the language file. Otherwise, if the admin hasn't specified a locale /// then use the one from the default language. Otherwise (and this is the /// majority of cases), use the stored locale specified by admin. - if ($SESSION !== NULL and $lang = optional_param('lang', false, PARAM_SAFEDIR)) { + if ($SESSION !== NULL && isset($_GET['lang']) && ($lang = clean_param($_GET['lang'], PARAM_SAFEDIR))) { if (file_exists($CFG->dataroot .'/lang/'. $lang) or file_exists($CFG->dirroot .'/lang/'. $lang)) { $SESSION->lang = $lang; } else if (file_exists($CFG->dataroot.'/lang/'.$lang.'_utf8') or -- 2.39.5