Skip to content

Commit

Permalink
Using Location header is not subject to the meta-refresh bug in Mozilla
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Oct 31, 2003
1 parent 497588f commit 5d6c043
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/weblib.php
Expand Up @@ -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
Expand Down

0 comments on commit 5d6c043

Please sign in to comment.