diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-09-04 16:43:41 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-09-23 16:22:53 +0200 |
commit | 88f03192ba1f74a5ab8881c0c1cbb3b2203f9f3f (patch) | |
tree | b45f19a7fbf57d551356a984b5692d634dea91ec /apps/files_sharing/lib | |
parent | 6f5f1c4f142e5e2417b188b55d2f9fadf03749b3 (diff) | |
download | nextcloud-server-88f03192ba1f74a5ab8881c0c1cbb3b2203f9f3f.tar.gz nextcloud-server-88f03192ba1f74a5ab8881c0c1cbb3b2203f9f3f.zip |
Delay listening to owner changes untill we use a share for that owner
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/mountprovider.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 15 |
2 files changed, 16 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/mountprovider.php b/apps/files_sharing/lib/mountprovider.php index 14a79625993..458e7f2619b 100644 --- a/apps/files_sharing/lib/mountprovider.php +++ b/apps/files_sharing/lib/mountprovider.php @@ -69,12 +69,11 @@ class MountProvider implements IMountProvider { // for updating etags for the share owner when we make changes to this share. $ownerPropagator = $this->propagationManager->getChangePropagator($share['uid_owner']); - // for updating our etags when changes are made to the share from the owners side (probably indirectly by us trough another share) - $this->propagationManager->listenToOwnerChanges($share['uid_owner'], $user->getUID()); return new SharedMount( '\OC\Files\Storage\Shared', '/' . $user->getUID() . '/' . $share['file_target'], array( + 'propagationManager' => $this->propagationManager, 'propagator' => $ownerPropagator, 'share' => $share, 'user' => $user->getUID() diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index 1ac401f3cf8..47f3bcf7602 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -50,13 +50,28 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage { */ private $ownerView; + /** + * @var \OCA\Files_Sharing\Propagation\PropagationManager + */ + private $propagationManager; + + /** + * @var string + */ + private $user; + public function __construct($arguments) { $this->share = $arguments['share']; $this->ownerView = $arguments['ownerView']; + $this->propagationManager = $arguments['propagationManager']; + $this->user = $arguments['user']; } private function init() { Filesystem::initMountPoints($this->share['uid_owner']); + + // for updating our etags when changes are made to the share from the owners side (probably indirectly by us trough another share) + $this->propagationManager->listenToOwnerChanges($this->share['uid_owner'], $this->user); } /** |