includes/functions.php
changeset 556 63e131c38876
parent 542 5841df0ab575
child 562 75df0b2c596c
equal deleted inserted replaced
555:ac4c6a7f01d8 556:63e131c38876
   274   global $timezone;
   274   global $timezone;
   275   // it's gonna be in minutes, so multiply by 60 to offset the unix timestamp
   275   // it's gonna be in minutes, so multiply by 60 to offset the unix timestamp
   276   $timestamp = $timestamp + ( $timezone * 60 );
   276   $timestamp = $timestamp + ( $timezone * 60 );
   277   
   277   
   278   // Let PHP do the work for us =)
   278   // Let PHP do the work for us =)
   279   return date($string, $timestamp);
   279   return gmdate($string, $timestamp);
   280 }
   280 }
   281 
   281 
   282 /**
   282 /**
   283  * Tells you the title for the given page ID string
   283  * Tells you the title for the given page ID string
   284  * @param string Page ID string (ex: Special:Administration)
   284  * @param string Page ID string (ex: Special:Administration)
   331 /**
   331 /**
   332  * Redirect the user to the specified URL.
   332  * Redirect the user to the specified URL.
   333  * @param string $url The URL, either relative or absolute.
   333  * @param string $url The URL, either relative or absolute.
   334  * @param string $title The title of the message
   334  * @param string $title The title of the message
   335  * @param string $message A short message to show to the user
   335  * @param string $message A short message to show to the user
   336  * @param string $timeout Timeout, in seconds, to delay the redirect. Defaults to 3.
   336  * @param string $timeout Timeout, in seconds, to delay the redirect. Defaults to 3. If 0, sends a 307 Temporary Redirect.
   337  */
   337  */
   338 
   338 
   339 function redirect($url, $title = 'etc_redirect_title', $message = 'etc_redirect_body', $timeout = 3)
   339 function redirect($url, $title = 'etc_redirect_title', $message = 'etc_redirect_body', $timeout = 3)
   340 {
   340 {
   341   global $db, $session, $paths, $template, $plugins; // Common objects
   341   global $db, $session, $paths, $template, $plugins; // Common objects