diff options
author | Frank Karlitschek <frank@owncloud.org> | 2013-11-13 19:43:18 +0100 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2013-11-13 19:43:18 +0100 |
commit | 8d0d0836bae968d3abff5f5ff9db230d449397a6 (patch) | |
tree | 1e860674e40972644148ebd9614981d2ff1f34de /lib/private/files/storage | |
parent | cd4a816c1187639ce6e3982b308c637bdd3f20e9 (diff) | |
parent | 58ff8a86733973980370b4e639203d32b2663d9a (diff) | |
download | nextcloud-server-8d0d0836bae968d3abff5f5ff9db230d449397a6.tar.gz nextcloud-server-8d0d0836bae968d3abff5f5ff9db230d449397a6.zip |
Merge branch 'master' of https://github.com/owncloud/corev6.0.0beta4
Diffstat (limited to 'lib/private/files/storage')
-rw-r--r-- | lib/private/files/storage/common.php | 10 | ||||
-rw-r--r-- | lib/private/files/storage/home.php | 21 |
2 files changed, 25 insertions, 6 deletions
diff --git a/lib/private/files/storage/common.php b/lib/private/files/storage/common.php index a5b79f0e967..3943d667c35 100644 --- a/lib/private/files/storage/common.php +++ b/lib/private/files/storage/common.php @@ -21,11 +21,11 @@ namespace OC\Files\Storage; */ abstract class Common implements \OC\Files\Storage\Storage { - private $cache; - private $scanner; - private $permissioncache; - private $watcher; - private $storageCache; + protected $cache; + protected $scanner; + protected $permissioncache; + protected $watcher; + protected $storageCache; public function __construct($parameters) { } diff --git a/lib/private/files/storage/home.php b/lib/private/files/storage/home.php index bf1d6017cbf..b4ceb8f4f9b 100644 --- a/lib/private/files/storage/home.php +++ b/lib/private/files/storage/home.php @@ -13,6 +13,11 @@ namespace OC\Files\Storage; */ class Home extends Local { /** + * @var string + */ + protected $id; + + /** * @var \OC\User\User $user */ protected $user; @@ -20,11 +25,25 @@ class Home extends Local { public function __construct($arguments) { $this->user = $arguments['user']; $datadir = $this->user->getHome(); + if (isset($arguments['legacy']) && $arguments['legacy']) { + // legacy home id (<= 5.0.12) + $this->id = 'local::' . $datadir . '/'; + } + else { + $this->id = 'home::' . $this->user->getUID(); + } parent::__construct(array('datadir' => $datadir)); } public function getId() { - return 'home::' . $this->user->getUID(); + return $this->id; + } + + public function getCache($path = '') { + if (!isset($this->cache)) { + $this->cache = new \OC\Files\Cache\HomeCache($this); + } + return $this->cache; } } |