Skip to content

Commit

Permalink
"MDL-14129, fix print_error"
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Jun 15, 2008
1 parent 004efe6 commit 4f2a63c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions lang/en_utf8/error.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
$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';
Expand Down Expand Up @@ -356,6 +357,7 @@
$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';
Expand Down
2 changes: 1 addition & 1 deletion message/discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions theme/chameleon/ui/css.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

$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
Expand Down Expand Up @@ -61,4 +61,4 @@
}


?>
?>
4 changes: 2 additions & 2 deletions theme/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -47,7 +47,7 @@
admin_externalpage_print_footer();
exit;
} else {
print_error("Could not set the theme!");
print_error('cannotsettheme');
}
}

Expand Down
2 changes: 1 addition & 1 deletion theme/preview.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

if (! $site = get_site()) {
print_error("Site doesn't exist!");
print_error('siteisnotdefined', 'debug');
}

require_login();
Expand Down

0 comments on commit 4f2a63c

Please sign in to comment.