aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-18 22:00:10 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-18 22:00:10 +0100
commitb7deef46ac2f49b310d05d94067607e8f19c0817 (patch)
treeea051e66e5ce6955c72f1b8c2b44bdb0ca29c972 /phpBB
parentf6fd819764016afe39dcc3c486b0fe73c9478ad5 (diff)
parent6e4ab6509b38f03daa2fb2af30df61423b126bdf (diff)
downloadforums-b7deef46ac2f49b310d05d94067607e8f19c0817.tar
forums-b7deef46ac2f49b310d05d94067607e8f19c0817.tar.gz
forums-b7deef46ac2f49b310d05d94067607e8f19c0817.tar.bz2
forums-b7deef46ac2f49b310d05d94067607e8f19c0817.tar.xz
forums-b7deef46ac2f49b310d05d94067607e8f19c0817.zip
Merge branch '3.1.x' into 3.2.x
* 3.1.x: [ticket/13681] Invalidate and reset opcache where necessary
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_messenger.php10
-rw-r--r--phpBB/phpbb/cache/driver/base.php5
-rw-r--r--phpBB/phpbb/cache/driver/file.php5
3 files changed, 20 insertions, 0 deletions
diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php
index b306b9aa79..7ed9a772ec 100644
--- a/phpBB/includes/functions_messenger.php
+++ b/phpBB/includes/functions_messenger.php
@@ -873,6 +873,11 @@ class queue
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->queue_data), true) . ");\n\n?>");
fclose($fp);
+ if (function_exists('opcache_invalidate'))
+ {
+ @opcache_invalidate($this->cache_file);
+ }
+
try
{
$this->filesystem->phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
@@ -922,6 +927,11 @@ class queue
fwrite($fp, "<?php\nif (!defined('IN_PHPBB')) exit;\n\$this->queue_data = unserialize(" . var_export(serialize($this->data), true) . ");\n\n?>");
fclose($fp);
+ if (function_exists('opcache_invalidate'))
+ {
+ @opcache_invalidate($this->cache_file);
+ }
+
try
{
$this->filesystem->phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
diff --git a/phpBB/phpbb/cache/driver/base.php b/phpBB/phpbb/cache/driver/base.php
index 85762c4d95..f4b3dc278d 100644
--- a/phpBB/phpbb/cache/driver/base.php
+++ b/phpBB/phpbb/cache/driver/base.php
@@ -63,6 +63,11 @@ abstract class base implements \phpbb\cache\driver\driver_interface
unset($this->sql_rowset);
unset($this->sql_row_pointer);
+ if (function_exists('opcache_reset'))
+ {
+ @opcache_reset();
+ }
+
$this->vars = array();
$this->sql_rowset = array();
$this->sql_row_pointer = array();
diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php
index bb055d3acf..d994394249 100644
--- a/phpBB/phpbb/cache/driver/file.php
+++ b/phpBB/phpbb/cache/driver/file.php
@@ -574,6 +574,11 @@ class file extends \phpbb\cache\driver\base
fclose($handle);
+ if (function_exists('opcache_invalidate'))
+ {
+ @opcache_invalidate($this->cache_file);
+ }
+
try
{
$this->filesystem->phpbb_chmod($file, CHMOD_READ | CHMOD_WRITE);