From: moodler Date: Fri, 31 Oct 2003 08:13:44 +0000 (+0000) Subject: Using Location header is not subject to the meta-refresh bug in Mozilla X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5d6c043a39a218ad05e1e251ecdd6feaf0082c04;p=moodle.git Using Location header is not subject to the meta-refresh bug in Mozilla --- diff --git a/lib/weblib.php b/lib/weblib.php index 49df224468..02d9cc9b7e 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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 ""; + sleep($delay); + header("Location: $url"); } else { if (empty($delay)) { $delay = 3; // There's no point having a message with no delay