diff options
author | icewind1991 <robin@icewind.nl> | 2014-06-17 17:40:05 +0200 |
---|---|---|
committer | icewind1991 <robin@icewind.nl> | 2014-06-17 17:40:05 +0200 |
commit | 8d1cf79152b16b11e8be3bc6cc57f5a9e72b04dd (patch) | |
tree | ef158aadc779e95845384783bbe668abed4c2d85 /apps/files_sharing/lib/sharedstorage.php | |
parent | cce58368ad03f4ef3d8a1ad3e26e09fc51ca716a (diff) | |
parent | 07fdeba50b47848c995d38408635020e08cecb19 (diff) | |
download | nextcloud-server-8d1cf79152b16b11e8be3bc6cc57f5a9e72b04dd.tar.gz nextcloud-server-8d1cf79152b16b11e8be3bc6cc57f5a9e72b04dd.zip |
Merge pull request #8399 from owncloud/server-server-sharing
Add server<->server sharing
Diffstat (limited to 'apps/files_sharing/lib/sharedstorage.php')
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 59de2dfa4c4..8d5b22dc283 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -23,12 +23,13 @@ namespace OC\Files\Storage; use OC\Files\Filesystem; +use OCA\Files_Sharing\ISharedStorage; use OCA\Files_Sharing\SharedMount; /** * Convert target path to source path and pass the function call to the correct storage provider */ -class Shared extends \OC\Files\Storage\Common { +class Shared extends \OC\Files\Storage\Common implements ISharedStorage { private $share; // the shared resource private $files = array(); @@ -488,16 +489,25 @@ class Shared extends \OC\Files\Storage\Common { return $this->filemtime($path) > $time; } - public function getCache($path = '') { - return new \OC\Files\Cache\Shared_Cache($this); + public function getCache($path = '', $storage = null) { + if (!$storage) { + $storage = $this; + } + return new \OC\Files\Cache\Shared_Cache($storage); } - public function getScanner($path = '') { - return new \OC\Files\Cache\Scanner($this); + public function getScanner($path = '', $storage = null) { + if (!$storage) { + $storage = $this; + } + return new \OC\Files\Cache\Scanner($storage); } - public function getWatcher($path = '') { - return new \OC\Files\Cache\Shared_Watcher($this); + public function getWatcher($path = '', $storage = null) { + if (!$storage) { + $storage = $this; + } + return new \OC\Files\Cache\Shared_Watcher($storage); } public function getOwner($path) { |