]> git.mjollnir.org Git - moodle.git/commitdiff
fix for MDL-8517 broken xhtml for redirects
authortoyomoyo <toyomoyo>
Thu, 15 Feb 2007 05:15:06 +0000 (05:15 +0000)
committertoyomoyo <toyomoyo>
Thu, 15 Feb 2007 05:15:06 +0000 (05:15 +0000)
admin/langimport.php
lib/weblib.php

index 7ae5dd38bfc5afcfacecb91c8549c2203606a56a..81b6cb320066d492191616be20b1da0e7bdcc107 100755 (executable)
@@ -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:
index d49405d0b0fa3d5183766283eff8f649ce6f8f6e..9f288fb539d5cd6d4f4fac09a654dc7516d708eb 100644 (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;
 }