includes/functions.php
changeset 344 be6c5fdd9203
parent 343 eefe9ab7fe7c
child 345 4ccdfeee9a11
equal deleted inserted replaced
341:1e3b55a591d1 344:be6c5fdd9203
   283 function redirect($url, $title = 'etc_redirect_title', $message = 'etc_redirect_body', $timeout = 3)
   283 function redirect($url, $title = 'etc_redirect_title', $message = 'etc_redirect_body', $timeout = 3)
   284 {
   284 {
   285   global $db, $session, $paths, $template, $plugins; // Common objects
   285   global $db, $session, $paths, $template, $plugins; // Common objects
   286   global $lang;
   286   global $lang;
   287 
   287 
   288   if ( $timeout == 0 )
   288   // POST check added in 1.1.x because Firefox asks us if we want to "resend the form
       
   289   // data to the new location", which can be confusing for some users.
       
   290   if ( $timeout == 0 && empty($_POST) )
   289   {
   291   {
   290     header('Location: ' . $url);
   292     header('Location: ' . $url);
   291     header('HTTP/1.1 307 Temporary Redirect');
   293     header('HTTP/1.1 307 Temporary Redirect');
   292   }
   294   }
   293   
   295