diff --git a/apps/files_sharing/lib/mountprovider.php b/apps/files_sharing/lib/mountprovider.php index 9f18ef737b3849f8d717f1bdef43b55ba2d29a06..94fb473883d63ce083a9d8d17ba517b990f55b03 100644 --- a/apps/files_sharing/lib/mountprovider.php +++ b/apps/files_sharing/lib/mountprovider.php @@ -30,14 +30,14 @@ class MountProvider implements IMountProvider { * @param \OCP\IConfig $config * @param \OCA\Files_Sharing\Propagation\PropagationManager $propagationManager */ - function __construct(IConfig $config, PropagationManager $propagationManager) { + public function __construct(IConfig $config, PropagationManager $propagationManager) { $this->config = $config; $this->propagationManager = $propagationManager; } /** - * Get all mountpoints applicable for the user + * Get all mountpoints applicable for the user and check for shares where we need to update the etags * * @param \OCP\IUser $user * @param \OCP\Files\Storage\IStorageFactory $storageFactory diff --git a/apps/files_sharing/lib/propagation/changewatcher.php b/apps/files_sharing/lib/propagation/changewatcher.php index e5ca62c6d8cbb14bdee6c65369ca0f9f3aaee50c..33048081f9caa24309cf2273c1368eb64ed89221 100644 --- a/apps/files_sharing/lib/propagation/changewatcher.php +++ b/apps/files_sharing/lib/propagation/changewatcher.php @@ -23,7 +23,10 @@ class ChangeWatcher { */ private $baseView; - function __construct(View $baseView) { + /** + * @param \OC\Files\View $baseView the view for the logged in user + */ + public function __construct(View $baseView) { $this->baseView = $baseView; } @@ -62,7 +65,7 @@ class ChangeWatcher { $view = new View('/' . $share['uid_owner'] . '/files'); $shareRootPath = $view->getPath($share['item_source']); - if ($shareRootPath) { + if (!is_null($shareRootPath)) { $path = $shareRootPath . '/' . $internalPath; $propagator->addChange($path); $propagator->propagateChanges(); diff --git a/apps/files_sharing/lib/propagation/propagationmanager.php b/apps/files_sharing/lib/propagation/propagationmanager.php index 14763a4df7a9ad340c6b1847e2c62779d87ffbfe..794a7ae04f586909fff92575ed0123d8db72d49a 100644 --- a/apps/files_sharing/lib/propagation/propagationmanager.php +++ b/apps/files_sharing/lib/propagation/propagationmanager.php @@ -42,9 +42,7 @@ class PropagationManager { */ private $sharePropagators = []; - private $globalSetupDone = false; - - function __construct(IUserSession $userSession, IConfig $config) { + public function __construct(IUserSession $userSession, IConfig $config) { $this->userSession = $userSession; $this->config = $config; } @@ -82,7 +80,7 @@ class PropagationManager { } /** - * Attach the propagator to the change propagator of a user to listen to changes made to files shared by the user + * Attach the recipient propagator for $user to the change propagator of a share owner to mark shares as dirty when the owner makes a change to a share * * @param string $shareOwner * @param string $user diff --git a/apps/files_sharing/lib/sharedmount.php b/apps/files_sharing/lib/sharedmount.php index 8c473e1f1c23d8765e90df200e3dcf987b10b141..15aea0aa52a37563e081f4c2265a5c5ecd0e948f 100644 --- a/apps/files_sharing/lib/sharedmount.php +++ b/apps/files_sharing/lib/sharedmount.php @@ -184,8 +184,7 @@ class SharedMount extends MountPoint implements MoveableMount { } public function getShare() { - $this->getStorage(); //ensure it exists - return $this->storage->getShare(); + return $this->getStorage()->getShare(); } /**