mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
fix for MDL-8517 broken xhtml for redirects
This commit is contained in:
parent
3d6d244728
commit
09b62d3b99
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user