]> source.dussan.org Git - nextcloud-server.git/commitdiff
don't use xcache in case admin auth is enabled in php.ini - this can cause issues
authorThomas Müller <thomas.mueller@tmit.eu>
Fri, 9 Aug 2013 20:14:28 +0000 (22:14 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Fri, 9 Aug 2013 20:14:28 +0000 (22:14 +0200)
lib/memcache/xcache.php

index 33de30562f901e7bbaef111cc823f70db700ec95..7880518fd9f6bed4bc84471826a439703c5d1c49 100644 (file)
@@ -10,7 +10,7 @@ namespace OC\Memcache;
 
 class XCache extends Cache {
        /**
-        * entries in XCache gets namespaced to prevent collisions between owncloud instances and users
+        * entries in XCache gets namespaced to prevent collisions between ownCloud instances and users
         */
        protected function getNameSpace() {
                return $this->prefix;
@@ -44,11 +44,16 @@ class XCache extends Cache {
        static public function isAvailable(){
                if (!extension_loaded('xcache')) {
                        return false;
-               } elseif (\OC::$CLI) {
+               }
+               if (\OC::$CLI) {
+                       return false;
+               }
+               // as soon as admin auth is enabled we can run into issues with admin ops like xcache_clear_cache
+               if (ini_get('xcache.admin.enable_auth')) {
                        return false;
-               }else{
-                       return true;
                }
+
+               return true;
        }
 }