]> git.mjollnir.org Git - moodle.git/commitdiff
edit profile: MDL-15607 Edit profile form breaks if the list of countries in the...
authortjhunt <tjhunt>
Tue, 13 Jan 2009 06:03:26 +0000 (06:03 +0000)
committertjhunt <tjhunt>
Tue, 13 Jan 2009 06:03:26 +0000 (06:03 +0000)
After this patch it still breaks, unavoidably, but at least there is now an error message.

lang/en_utf8/error.php
lib/moodlelib.php

index 6cc2194ebc0b585e1421aed5740b195a456662ea..f584e8e9e7d60739b3ad5722ed339cb0b653e72d 100644 (file)
@@ -172,6 +172,7 @@ $string['commentmisconf'] = 'Comment ID is misconfigured';
 $string['componentisuptodate'] = 'Component is up-to-date';
 $string['confirmsesskeybad'] = 'Sorry, but your session key could not be confirmed to carry out this action.  This security feature prevents against accidental or malicious execution of important functions in your name.  Please make sure you really wanted to execute this function.';
 $string['couldnotassignrole'] = 'A serious but unspecified error occurred while trying to assign a role to you';
+$string['countriesphpempty'] = 'Error: The file countries.php in language pack $a is empty or missing.';
 $string['coursegroupunknown'] = 'Course corresponding to group $a not specified';
 $string['coursemisconf'] = 'Course is misconfigured';
 $string['courserequestdisabled'] = 'Sorry, but requesting courses has been disabled by the administrator';
index 74cbb802f2232533f274534bb7bdd2f6909da606..ac669dfd0150288125304218cce71729d8cc122c 100644 (file)
@@ -5767,6 +5767,8 @@ function get_list_of_countries() {
 
     if (!empty($string)) {
         uasort($string, 'strcoll');
+    } else {
+        print_error('countriesphpempty', '', '', $lang);
     }
 
     return $string;