MDL-7861, adding third param to error() function to print correct admin footer
This commit is contained in:
+4
-4
@@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
if (!file_exists($langdir)) {
|
||||
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang');
|
||||
error ('to edit this language pack, you need to put it in '.$CFG->dataroot.'/lang','',$adminroot);
|
||||
}
|
||||
// Shall I save POSTed data?
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if (langdoc_save_file($langdir, $currentfile, $_POST['filedata'])) {
|
||||
notify(get_string("changessaved")." ($langdir/$currentfile)", "green");
|
||||
} else {
|
||||
error("Could not save the file '$currentfile'!", "langdoc.php?currentfile=$currentfile&sesskey=$USER->sesskey");
|
||||
error("Could not save the file '$currentfile'!", "langdoc.php?currentfile=$currentfile&sesskey=$USER->sesskey", $adminroot);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@
|
||||
// Get all files from /docs directory
|
||||
|
||||
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/docs", "CVS")) {
|
||||
error("Could not find English language docs files!");
|
||||
error("Could not find English language docs files!",'',$adminroot);
|
||||
}
|
||||
|
||||
$options = array();
|
||||
@@ -81,7 +81,7 @@
|
||||
// Get all files from /help directory
|
||||
|
||||
if (! $files = get_directory_list("$CFG->dirroot/lang/en_utf8/help", "CVS")) {
|
||||
error("Could not find English language help files!");
|
||||
error("Could not find English language help files!",'',$adminroot);
|
||||
}
|
||||
|
||||
foreach ($files as $filekey => $file) { // check all the help files.
|
||||
|
||||
+7
-2
@@ -4481,7 +4481,7 @@ function print_scale_menu_helpbutton($courseid, $scale, $return=false) {
|
||||
* @param string $message The message to display to the user about the error.
|
||||
* @param string $link The url where the user will be prompted to continue. If no url is provided the user will be directed to the site index page.
|
||||
*/
|
||||
function error ($message, $link='') {
|
||||
function error ($message, $link='', $adminroot='') {
|
||||
|
||||
global $CFG, $SESSION;
|
||||
$message = clean_text($message); // In case nasties are in here
|
||||
@@ -4515,7 +4515,12 @@ function error ($message, $link='') {
|
||||
}
|
||||
}
|
||||
print_continue($link);
|
||||
print_footer();
|
||||
|
||||
if ($adminroot) {
|
||||
admin_externalpage_print_footer($adminroot);
|
||||
} else {
|
||||
print_footer();
|
||||
}
|
||||
for ($i=0;$i<512;$i++) { // Padding to help IE work with 404
|
||||
echo ' ';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user