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?
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);
}
}
}
// 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();
// 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.
* @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
}
}
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 ' ';
}