mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
Merge most changes from 3.0.x branch since the 25th december.
(Captcha changes for refreshing captcha image not included) git-svn-id: file:///svn/phpbb/trunk@9404 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -89,7 +89,7 @@ class phpbb_acm_file extends phpbb_acm_abstract
|
||||
if ($fp = @fopen($filename, 'wb'))
|
||||
{
|
||||
@flock($fp, LOCK_EX);
|
||||
fwrite($fp, "<?php\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\$data = " . (sizeof($data) ? "unserialize(" . var_export(serialize($data), true) . ");" : 'array();'));
|
||||
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$expired = (time() > " . (time() + $ttl) . ") ? true : false;\nif (\$expired) { return; }\n\$data = " . (sizeof($data) ? "unserialize(" . var_export(serialize($data), true) . ");" : 'array();'));
|
||||
@flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
|
||||
@@ -163,7 +163,7 @@ class phpbb_acm_file extends phpbb_acm_abstract
|
||||
if ($fp = @fopen($filename, 'wb'))
|
||||
{
|
||||
@flock($fp, LOCK_EX);
|
||||
fwrite($fp, "<?php\n\$this->vars = unserialize(" . var_export(serialize($this->vars), true) . ");\n\$this->var_expires = unserialize(" . var_export(serialize($this->var_expires), true) . ");");
|
||||
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->vars = unserialize(" . var_export(serialize($this->vars), true) . ");\n\$this->var_expires = unserialize(" . var_export(serialize($this->var_expires), true) . ");");
|
||||
@flock($fp, LOCK_UN);
|
||||
fclose($fp);
|
||||
|
||||
@@ -174,10 +174,13 @@ class phpbb_acm_file extends phpbb_acm_abstract
|
||||
// Now, this occurred how often? ... phew, just tell the user then...
|
||||
if (!@is_writable($this->cache_dir))
|
||||
{
|
||||
trigger_error($this->cache_dir . ' is NOT writable.', E_USER_ERROR);
|
||||
// We need to use die() here, because else we may encounter an infinite loop (the message handler calls $cache->unload())
|
||||
die($this->cache_dir . ' is NOT writable.');
|
||||
exit;
|
||||
}
|
||||
|
||||
trigger_error('Not able to open ' . $filename, E_USER_ERROR);
|
||||
die('Not able to open ' . $filename);
|
||||
exit;
|
||||
}
|
||||
|
||||
$this->is_modified = false;
|
||||
|
Reference in New Issue
Block a user