diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-30 04:11:28 -0700 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-30 04:11:28 -0700 |
commit | 480aeb804fc64be6fdcb1551f89e21304e270b33 (patch) | |
tree | f6bc00728db90071b6affea89b5c06c15909fe07 /lib/cache/file.php | |
parent | ebb2278a6770cc68698e1ba5cb914d615b573519 (diff) | |
parent | 629faf6d343e7906322d125718f97d3ac2f9569b (diff) | |
download | nextcloud-server-480aeb804fc64be6fdcb1551f89e21304e270b33.tar.gz nextcloud-server-480aeb804fc64be6fdcb1551f89e21304e270b33.zip |
Merge pull request #4459 from owncloud/appframework-master
Public API for OC6+ (includes AppFramework)
Diffstat (limited to 'lib/cache/file.php')
-rw-r--r-- | lib/cache/file.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/cache/file.php b/lib/cache/file.php index 361138e4736..2ab914d17b8 100644 --- a/lib/cache/file.php +++ b/lib/cache/file.php @@ -6,24 +6,25 @@ * See the COPYING-README file. */ +namespace OC\Cache; -class OC_Cache_File{ +class File { protected $storage; protected function getStorage() { if (isset($this->storage)) { return $this->storage; } - if(OC_User::isLoggedIn()) { - \OC\Files\Filesystem::initMountPoints(OC_User::getUser()); + if(\OC_User::isLoggedIn()) { + \OC\Files\Filesystem::initMountPoints(\OC_User::getUser()); $subdir = 'cache'; - $view = new \OC\Files\View('/'.OC_User::getUser()); + $view = new \OC\Files\View('/' . \OC_User::getUser()); if(!$view->file_exists($subdir)) { $view->mkdir($subdir); } - $this->storage = new \OC\Files\View('/'.OC_User::getUser().'/'.$subdir); + $this->storage = new \OC\Files\View('/' . \OC_User::getUser().'/'.$subdir); return $this->storage; }else{ - OC_Log::write('core', 'Can\'t get cache storage, user not logged in', OC_Log::ERROR); + \OC_Log::write('core', 'Can\'t get cache storage, user not logged in', \OC_Log::ERROR); return false; } } |