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:
* 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;
//]]>
</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;
}