Ignore:
Timestamp:
Mar 31, 2004, 10:43:09 PM (20 years ago)
Author:
z0rglub
Message:

redirections modification : use of a HTML refresh page instead of header PHP
function. The purpose is to avoid redirections failure when extra characters
are found in included PHP files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions.inc.php

    r394 r405  
    2525// | USA.                                                                  |
    2626// +-----------------------------------------------------------------------+
     27
    2728include_once( PHPWG_ROOT_PATH .'include/functions_user.inc.php' );
    2829include_once( PHPWG_ROOT_PATH .'include/functions_session.inc.php' );
     
    463464}
    464465
     466/**
     467 * Redirects to the given URL
     468 *
     469 * Note : once this function called, the execution doesn't go further
     470 * (presence of an exit() instruction.
     471 *
     472 * @param string $url
     473 * @return void
     474 */
     475function redirect( $url )
     476{
     477  global $user, $template, $lang_info, $conf, $lang, $t2;
     478
     479  // $refresh, $url_link and $title are required for creating an automated
     480  // refresh page in header.tpl
     481  $refresh = 5;
     482  $url_link = $url;
     483  $title = 'redirection';
     484  include( PHPWG_ROOT_PATH.'include/page_header.php' );
     485 
     486  $template->set_filenames( array( 'redirect' => 'redirect.tpl' ) );
     487  $template->pparse('redirect');
     488 
     489  include( PHPWG_ROOT_PATH.'include/page_tail.php' );
     490
     491  exit();
     492}
    465493?>
Note: See TracChangeset for help on using the changeset viewer.