Merge branch 'MDL-58952' of https://github.com/scyrma/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 20 Jun 2017 10:31:30 +0000 (11:31 +0100)
committerDan Poltawski <dan@moodle.com>
Tue, 20 Jun 2017 10:31:30 +0000 (11:31 +0100)
admin/registration/forms.php

index 92b15e8..6e0b8a9 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);