fix for MDL-8517 broken xhtml for redirects

This commit is contained in:
toyomoyo 2007-02-15 05:15:06 +00:00
parent 3d6d244728
commit 09b62d3b99
2 changed files with 8 additions and 3 deletions

View File

@ -57,7 +57,7 @@
case INSTALLED:
@unlink($CFG->dataroot.'/cache/languages');
redirect('langimport.php', get_string('langpackupdated','admin',$pack));
redirect('langimport.php', get_string('langpackupdated','admin',$pack), -1, $adminroot);
break;
case UPTODATE:

View File

@ -4809,7 +4809,7 @@ function notice_yesno ($message, $linkyes, $linkno, $optionsyes=NULL, $optionsno
* the correct input) and then encode for where it's needed
* echo "<script type='text/javascript'>alert('Redirect $url');</script>";
*/
function redirect($url, $message='', $delay=-1) {
function redirect($url, $message='', $delay=-1, $adminroot = '') {
global $CFG;
@ -4888,7 +4888,12 @@ function redirect($url, $message='', $delay=-1) {
//]]>
</script>
<?php
print_footer('none');
// fix for MDL-8517, admin pages redirections causes bad xhtml
if ($adminroot) {
admin_externalpage_print_footer($adminroot);
} else {
print_footer('none');
}
die;
}