Commit e4e056fa authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Use site name for site unavailable message if possible

parent f9193cad
......@@ -50,6 +50,6 @@ $string['dbconnfailed'] = 'Failed to connect to database, error message was %s';
// if you change these next two , be sure to change them in libroot/errors.php
// as they are duplicated there, in the case that get_string was not available.
$string['unrecoverableerror'] = 'A nonrecoverable error occured. This probably means that you have encountered a bug in the system';
$string['unrecoverableerrortitle'] = 'Mahara - Site Unavailable';
$string['unrecoverableerrortitle'] = '%s - Site Unavailable';
?>
......@@ -381,7 +381,10 @@ function exception (Exception $e) {
// rather than by switch on class name
if (function_exists('get_string')) {
$outputmessage = get_string('unrecoverableerror', 'error');
$outputtitle = get_string('unrecoverableerrortitle', 'error');
if (!function_exists('get_config') || !$sitename = @get_config('sitename')) {
$sitename = 'Mahara';
}
$outputtitle = get_string('unrecoverableerrortitle', 'error', $sitename);
}
else {
// sensible english defaults
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment