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/page_header.php

    r398 r405  
    3131$template->set_filenames(array('header'=>'header.tpl'));
    3232
    33 $css = PHPWG_ROOT_PATH.'template/'.$user['template'].'/'.$user['template'].'.css';
    34 $template->assign_vars(array(
    35   'CONTENT_ENCODING' => $lang_info['charset'],
    36   'PAGE_TITLE' => $title,
    37   'LANG'=>$lang_info['code'],
    38   'DIR'=>$lang_info['direction'],
    39  
    40   'T_STYLE' => $css
    41   ));
     33$css = PHPWG_ROOT_PATH.'template/'.$user['template'];
     34$css.= '/'.$user['template'].'.css';
     35
     36$template->assign_vars(
     37  array(
     38    'CONTENT_ENCODING' => $lang_info['charset'],
     39    'PAGE_TITLE' => $title,
     40    'LANG'=>$lang_info['code'],
     41    'DIR'=>$lang_info['direction'],
     42   
     43    'T_STYLE' => $css
     44    ));
    4245
    4346// refresh
    44 if ( isset( $refresh ) && $refresh >0 && isset($url_link))
     47if ( isset( $refresh ) and $refresh > 0 and isset( $url_link ) )
    4548{
    46   $url = $url_link.'&slideshow='.$refresh;
    47   $template->assign_vars(array(
    48                            'REFRESH_TIME' => $refresh,
    49                            'U_REFRESH' => add_session_id( $url )
    50                            ));
     49  $template->assign_vars(
     50    array(
     51      'REFRESH_TIME' => $refresh,
     52      'U_REFRESH' => add_session_id( $url_link )
     53      ));
    5154  $template->assign_block_vars('refresh', array());
    5255}
    5356
    54 // Work around for "current" Apache 2 + PHP module which seems to not
    55 // cope with private cache control setting
    56 if (!empty( $_SERVER['SERVER_SOFTWARE'] )
    57     and strstr( $_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
    58 {
    59   header( 'Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0' );
    60 }
    61 else
    62 {
    63   header( 'Cache-Control: private, pre-check=0, post-check=0, max-age=0' );
    64 }
    65 header( 'Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT' );
    66 header( 'Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT' );
    67 
    6857$template->pparse('header');
    6958?>
Note: See TracChangeset for help on using the changeset viewer.