mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
my attempt to break the source. :D
The Cache-Control change may stay or may not stay. fixed: php3 compliance within the emailer. :) git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@4073 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -148,7 +148,8 @@ class emailer
|
||||
$this->msg = preg_replace('#\{([a-z0-9\-_]*?)\}#is', "' . $\\1 . '", $this->msg);
|
||||
|
||||
// Set vars
|
||||
foreach ($this->vars as $key => $val)
|
||||
reset ($this->vars);
|
||||
while (list($key, $val) = each($this->vars))
|
||||
{
|
||||
$$key = $val;
|
||||
}
|
||||
@@ -156,7 +157,8 @@ class emailer
|
||||
eval("\$this->msg = '$this->msg';");
|
||||
|
||||
// Clear vars
|
||||
foreach ($this->vars as $key => $val)
|
||||
reset ($this->vars);
|
||||
while (list($key, $val) = each($this->vars))
|
||||
{
|
||||
unset($$key);
|
||||
}
|
||||
|
@@ -461,15 +461,18 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
// Add no-cache control for cookies if they are set
|
||||
$c_no_cache = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) ? 'no-cache="set-cookie", ' : '';
|
||||
|
||||
// Work around for "current" Apache 2 + PHP module which seems to not
|
||||
// cope with private cache control setting
|
||||
if (!empty($HTTP_SERVER_VARS['SERVER_SOFTWARE']) && strstr($HTTP_SERVER_VARS['SERVER_SOFTWARE'], 'Apache/2'))
|
||||
{
|
||||
header ('Cache-Control: no-cache, pre-check=0, post-check=0, max-age=0');
|
||||
header ('Cache-Control: ' . $c_no_cache . 'no-cache, pre-check=0, post-check=0, max-age=0');
|
||||
}
|
||||
else
|
||||
{
|
||||
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
|
||||
header ('Cache-Control: ' . $c_no_cache . 'private, pre-check=0, post-check=0, max-age=0');
|
||||
}
|
||||
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
Reference in New Issue
Block a user