]> git.mjollnir.org Git - moodle.git/commitdiff
Using Location header is not subject to the meta-refresh bug in Mozilla
authormoodler <moodler>
Fri, 31 Oct 2003 08:13:44 +0000 (08:13 +0000)
committermoodler <moodler>
Fri, 31 Oct 2003 08:13:44 +0000 (08:13 +0000)
lib/weblib.php

index 49df2244688d759930be260c890b2474ff9fe91a..02d9cc9b7eb6ff425f2c7aca7067e33f42e24c58 100644 (file)
@@ -1665,10 +1665,11 @@ function notice_yesno ($message, $linkyes, $linkno) {
 }
 
 function redirect($url, $message="", $delay="0") {
-// Uses META tags to redirect the user, after printing a notice
+// Redirects the user to another page, after printing a notice
 
     if (empty($message)) {
-        echo "<html><head><meta http-equiv=\"refresh\" content=\"$delay; url=$url\" /></head></html>";
+        sleep($delay);
+        header("Location: $url");
     } else {
         if (empty($delay)) {  
             $delay = 3;  // There's no point having a message with no delay