diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-04-20 13:32:09 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-04-27 14:07:16 +0200 |
commit | f488624e5ff3a8f580029e98373071d6fe91e2eb (patch) | |
tree | c36edb6a9e976da6383440929f4bb80a4e91f17c | |
parent | 526ea3fcba56502b9a3a5204221a0aa7e4fa538a (diff) | |
download | nextcloud-server-f488624e5ff3a8f580029e98373071d6fe91e2eb.tar.gz nextcloud-server-f488624e5ff3a8f580029e98373071d6fe91e2eb.zip |
minor fixes
-rw-r--r-- | apps/files_sharing/lib/mountprovider.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/lib/propagation/changewatcher.php | 7 | ||||
-rw-r--r-- | apps/files_sharing/lib/propagation/propagationmanager.php | 6 | ||||
-rw-r--r-- | apps/files_sharing/lib/sharedmount.php | 3 |
4 files changed, 10 insertions, 10 deletions
diff --git a/apps/files_sharing/lib/mountprovider.php b/apps/files_sharing/lib/mountprovider.php index 9f18ef737b3..94fb473883d 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 e5ca62c6d8c..33048081f9c 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 14763a4df7a..794a7ae04f5 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 8c473e1f1c2..15aea0aa52a 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(); } /** |