[Pkg-owncloud-commits] [owncloud] 98/215: minor fixes

David Prévot taffit at moszumanska.debian.org
Tue May 5 01:01:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit f488624e5ff3a8f580029e98373071d6fe91e2eb
Author: Robin Appelman <icewind at owncloud.com>
Date:   Mon Apr 20 13:32:09 2015 +0200

    minor fixes
---
 apps/files_sharing/lib/mountprovider.php                  | 4 ++--
 apps/files_sharing/lib/propagation/changewatcher.php      | 7 +++++--
 apps/files_sharing/lib/propagation/propagationmanager.php | 6 ++----
 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 9f18ef7..94fb473 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 e5ca62c..3304808 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 14763a4..794a7ae 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 8c473e1..15aea0a 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();
 	}
 
 	/**

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list