MDL-58952 admin: use valid default for language selection dropdown.
authorMathieu Petit-Clair <mathieu@petitclair.ca>
Tue, 16 May 2017 07:00:51 +0000 (15:00 +0800)
committerMathieu Petit-Clair <mathieu@petitclair.ca>
Tue, 16 May 2017 07:28:25 +0000 (15:28 +0800)
admin/registration/forms.php

index ddf2db6..c4373d1 100644 (file)
@@ -232,7 +232,7 @@ class site_registration_form extends moodleform {
         }
         $language = get_config('hub', 'site_language_' . $cleanhuburl);
         if ($language === false) {
-            $language = current_language();
+            $language = explode('_', current_language())[0];
         }
         $geolocation = get_config('hub', 'site_geolocation_' . $cleanhuburl);
         $contactable = get_config('hub', 'site_contactable_' . $cleanhuburl);