]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix OC_Cache_File
authorBart Visscher <bartv@thisnet.nl>
Wed, 29 Aug 2012 15:25:37 +0000 (17:25 +0200)
committerBart Visscher <bartv@thisnet.nl>
Wed, 29 Aug 2012 18:29:43 +0000 (20:29 +0200)
lib/cache/file.php

index a51f0d68f8259823a0455e36d44a3eb0fd629dc7..ed5212bc3d7495a35d00d93b5eef4fc4fcfe9bae 100644 (file)
@@ -10,8 +10,8 @@
 class OC_Cache_File{
        protected static $storage;
        protected function getStorage() {
-               if (isset(self::$storage)) {
-                       return self::$storage;
+               if (isset($this->storage)) {
+                       return $this->storage;
                }
                if(OC_User::isLoggedIn()){
                        $subdir = 'cache';
@@ -19,8 +19,8 @@ class OC_Cache_File{
                        if(!$view->file_exists($subdir)) {
                                $view->mkdir($subdir);
                        }
-                       self::$storage = new OC_FilesystemView('/'.OC_User::getUser().'/'.$subdir);
-                       return self::$storage;
+                       $this->storage = new OC_FilesystemView('/'.OC_User::getUser().'/'.$subdir);
+                       return $this->storage;
                }else{
                        OC_Log::write('core','Can\'t get cache storage, user not logged in', OC_Log::ERROR);
                        return false;