MDL-22015 fixed regression in last commit, sorry
authorPetr Skoda <skodak@moodle.org>
Wed, 14 Apr 2010 14:43:51 +0000 (14:43 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 14 Apr 2010 14:43:51 +0000 (14:43 +0000)
user/edit_form.php
user/editadvanced_form.php

index 661825c..b43d4c9 100644 (file)
@@ -54,7 +54,7 @@ class user_edit_form extends moodleform {
         if ($langsel = $mform->getElementValue('lang')) {
             $lang = reset($langsel);
             // check lang exists
-            if (get_string_manager()->translation_exists($lang, false)) {
+            if (!get_string_manager()->translation_exists($lang, false)) {
                 $lang_el =& $mform->getElement('lang');
                 $lang_el->setValue($CFG->lang);
             }
index d22b083..78cea1d 100644 (file)
@@ -74,7 +74,7 @@ class user_editadvanced_form extends moodleform {
         if ($langsel = $mform->getElementValue('lang')) {
             $lang = reset($langsel);
             // check lang exists
-            if (get_string_manager()->translation_exists($lang, false)) {
+            if (!get_string_manager()->translation_exists($lang, false)) {
                 $lang_el =& $mform->getElement('lang');
                 $lang_el->setValue($CFG->lang);
             }