]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't call xcache_clear_cache on clearOpcodeCache() in case admin auth is enabled...
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 9 Aug 2013 20:13:31 +0000 (22:13 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 9 Aug 2013 20:13:31 +0000 (22:13 +0200)
lib/util.php

index b7dc2207e6c17a8a768a605c540754fe150a4f0a..53ebe0247246a09843f79b599092948bd463f4f2 100755 (executable)
@@ -869,7 +869,11 @@ class OC_Util {
                }
                // XCache
                if (function_exists('xcache_clear_cache')) {
-                       xcache_clear_cache(XC_TYPE_VAR, 0);
+                       if (ini_get('xcache.admin.enable_auth')) {
+                               OC_Log::write('core', 'XCache will not be cleared because "xcache.admin.enable_auth" is enabled in php.ini.', \OC_Log::WARN);
+                       } else {
+                               xcache_clear_cache(XC_TYPE_VAR, 0);
+                       }
                }
                // Opcache (PHP >= 5.5)
                if (function_exists('opcache_reset')) {