]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-14129, fix print_error"
authordongsheng <dongsheng>
Sun, 15 Jun 2008 10:13:30 +0000 (10:13 +0000)
committerdongsheng <dongsheng>
Sun, 15 Jun 2008 10:13:30 +0000 (10:13 +0000)
lang/en_utf8/error.php
message/discussion.php
theme/chameleon/ui/css.php
theme/index.php
theme/preview.php

index 08beca639d60b5e372cd674ea06943391cfdd2c5..12ad4cd865e29c73ec1ec8c0dee5050ff2f6f366 100644 (file)
@@ -109,6 +109,7 @@ $string['cannotsavezipfile'] = 'Cannot save ZIP file.';
 $string['cannotsetparentforcatoritem'] = 'Can not set parent for category or course item!';
 $string['cannotsetpassword'] = 'Could not set user password!';
 $string['cannotsetprefgrade'] = 'Could not set preference aggregationview to $a for this grade category';
+$string['cannotsettheme'] = 'Could not set the theme!';
 $string['cannotsetupblock'] = 'Blocks tables could NOT be set up successfully!';
 $string['cannotsetupcategory'] = 'Serious Error! Could not set up a default course category!';
 $string['cannotsetupcapforplugin'] = 'Could not set up the capabilities for $a';
@@ -356,6 +357,7 @@ $string['spellcheckernotconf'] = 'Spellchecker not configured';
 $string['statscatchupmode'] = 'Statistics is currently in catchup mode. So far $a->daysdone day(s) have been processed and $a->dayspending are pending. Check back soon!';
 $string['tagnotfound'] = 'The specified tag was not found in the database';
 $string['tagdisabled'] = 'Tags are disabled!';
+$string['themenotinstall'] = 'This theme is not installed!';
 $string['transactionvoid'] = 'Transaction can not be voided because of already been voided.';
 $string['unicodeupgradeerror'] = 'Sorry, but your database is not already in Unicode, and this version of Moodle is not able to migrate your database to Unicode.  Please upgrade to Moodle 1.7.x first and perform the Unicode migration from the Admin page.  After that is done you should be able to migrate to Moodle $a';
 $string['unspecifycourseid'] = 'Must specify course id, short name or idnumber';
index 03b0243933f8c9247a3f92a2c974fed035a8e03f..aa844950844963382080e9c2646028ba5812f779 100644 (file)
@@ -19,7 +19,7 @@
 
 /// Check the user we are talking to is valid
     if (! $user = $DB->get_record('user', array('id'=>$userid))) {
-        print_error("User ID was incorrect");
+        print_error('invaliduserid');
     }
 
 /// Check if frame&jsless mode selected
index d7bd0fc56505f550eaf274709b0c9c065a03315a..2cfbcd3765ce336ad4635d734fc90fbcb81dae41 100644 (file)
@@ -10,7 +10,7 @@ if (empty($THEME->chameleonenabled)) {
 
 $id = optional_param('id', SITEID, PARAM_INT);
 if (!$course = $DB->get_record('course', array('id'=>$id))) {
-    print_error('Incorrect course id');
+    print_error('invalidcourseid');
 }
 
 course_setup($course); // we should not require login here
@@ -61,4 +61,4 @@ if (isset($_POST['css'])) {
 }
 
 
-?>
\ No newline at end of file
+?>
index 371e66b77c2b2109f00bc5c5be41f0bf61078138..636e4f5c82651b40e5d5c24c0e922bace407ed58 100644 (file)
@@ -23,7 +23,7 @@
 
     if ($choose and confirm_sesskey()) {
         if (!is_dir($CFG->themedir .'/'. $choose)) {
-            print_error("This theme is not installed!");
+            print_error('themenotinstall');
         }
         if (set_config("theme", $choose)) {
             theme_setup($choose);
@@ -47,7 +47,7 @@
             admin_externalpage_print_footer();
             exit;
         } else {
-            print_error("Could not set the theme!");
+            print_error('cannotsettheme');
         }
     }
 
index 99b89e2c99309e1267c9780249fdc7c3067c873b..0776667eefe485fd13b6b6eddb32d1c86b36b718 100644 (file)
@@ -9,7 +9,7 @@
     }
 
     if (! $site = get_site()) {
-        print_error("Site doesn't exist!");
+        print_error('siteisnotdefined', 'debug');
     }
 
     require_login();