diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-06-14 15:34:01 +0400 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-06-14 15:34:01 +0400 |
commit | f5b1f598ea5da3b8ed0d265a7f59936e776ceb6c (patch) | |
tree | 1c01ad6b7ff06c7b45398dd01784f9d7c726fba6 /lib/util.php | |
parent | 28d8ed972611d2386187397d9df2f70a31e4a308 (diff) |
Squashed commit of the following:
commit 85043af59846edd54b6f402829a698142fdb412f
Author: Michael Gapczynski <mtgap@owncloud.com>
Date: Sat May 25 11:25:43 2013 -0400
Clear opcode caches after writing to the config file, fixes #3372
commit e96ca0a217112a612e5018fb06115879be634f0b
Author: Michael Gapczynski <mtgap@owncloud.com>
Date: Fri May 17 11:15:53 2013 -0400
Add undefined verision variables
commit d7faeea0b8a79bcd84255120e396280fe62c8aa1
Author: Michael Gapczynski <mtgap@owncloud.com>
Date: Tue May 14 09:34:01 2013 -0400
Turn off theme before update
commit f620df4e88201a8d35ecb6173f258d5e5f67c7f9
Author: Bart Visscher <bartv@thisnet.nl>
Date: Tue Apr 16 08:07:44 2013 +0200
Also check for needed upgrade in the Sabre Maintenance connector
commit 223cfce8c89663beb95cf7438f47cea4bac6e0de
Author: Bart Visscher <bartv@thisnet.nl>
Date: Tue Apr 9 21:05:11 2013 +0200
Connect watcher failure function to the failure signal
commit 49b9a1e8af062c03ebc863e1139ca310944b784a
Author: Bart Visscher <bartv@thisnet.nl>
Date: Tue Apr 9 20:51:43 2013 +0200
Move start of the maintenance mode to the ajax call
Make sure the update page is shown in a browser. And not an ajax request
Diffstat (limited to 'lib/util.php')
-rwxr-xr-x | lib/util.php | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php index 7f5f30aa619..9d2038a26b1 100755 --- a/lib/util.php +++ b/lib/util.php @@ -825,5 +825,24 @@ class OC_Util { return $theme; } + /** + * Clear the opcode cache if one exists + * This is necessary for writing to the config file + * in case the opcode cache doesn't revalidate files + */ + public static function clearOpcodeCache() { + // APC + if (function_exists('apc_clear_cache')) { + apc_clear_cache(); + } + // Zend Opcache + if (function_exists('accelerator_reset')) { + accelerator_reset(); + } + // XCache + if (function_exists('xcache_clear_cache')) { + xcache_clear_cache(XC_TYPE_VAR, 0); + } + } } |