Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
"MDL-14129, fix print_error"
  • Loading branch information
dongsheng committed Jun 15, 2008
1 parent 6db04f1 commit e6edb40
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions lang/en_utf8/debug.php
Expand Up @@ -11,6 +11,7 @@
$string['cannotupdateversion'] = 'Upgrade failed! (Could not update version in config table)';
$string['cannotupdaterelease'] = 'ERROR: Could not update release version in database!!';
$string['cannotsetupsite'] = 'Serious Error! Could not set up the site!';
$string['cannotsetuptable'] = '$a tables could NOT be set up successfully!';
$string['cannotfindadmin'] = 'Could not find an admin user!';
$string['cannotupgradedbcustom'] = 'Upgrade of local database customisations failed! (Could not update version in config table)';
$string['configmoodle'] = 'Moodle has not been configured yet. You need to edit config.php first.';
Expand Down
1 change: 1 addition & 0 deletions lang/en_utf8/error.php
Expand Up @@ -18,6 +18,7 @@
$string['cannotaddcoursemoduletosection'] = 'Could not add the new course module to that section';
$string['cannotaddcmtosection'] = 'Could not add the new course module to that section';
$string['cannotaddrss'] = 'You do not have permission to add rss feeds';
$string['cannotaddmodule'] = '$a module could not be added to the module list!';
$string['cannotaddnewmodule'] = 'Could not add a new module of $a';
$string['cannotaddnewinstance'] = 'Could not add a new instance of $a';
$string['cannotsaveconfig'] = 'Problem saving config \"$a[0]\" as \"$a[1]\" for plugin \"$a[2]\"';
Expand Down
2 changes: 1 addition & 1 deletion lib/accesslib.php
Expand Up @@ -880,7 +880,7 @@ function require_capability($capability, $context, $userid=NULL, $doanything=tru

if (!has_capability($capability, $context, $userid, $doanything)) {
$capabilityname = get_capability_string($capability);
print_error($errormessage, $stringfile, $errorlink, $capabilityname);
print_error('nopermissions', '', $errorlink, $capabilityname);
}
}

Expand Down
4 changes: 2 additions & 2 deletions lib/adminlib.php
Expand Up @@ -558,10 +558,10 @@ function upgrade_activity_modules($return) {
echo '<hr />';
}
} else {
print_error($module->name .' module could not be added to the module list!');
print_error('cannotaddmodule', '', '', $module->name);
}
} else {
print_error($module->name .' tables could NOT be set up successfully!');
print_error('cannotsetuptable', 'debug', '', $module->name);
}
}

Expand Down

0 comments on commit e6edb40

Please sign in to comment.