[Pkg-owncloud-commits] [owncloud] 09/28: get owner from share item, if we expire a share while the user updates his /Shared folder than the owner is different from the currently logged in user

David Prévot taffit at moszumanska.debian.org
Sat Dec 7 02:33:31 UTC 2013


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

taffit pushed a commit to branch master
in repository owncloud.

commit c5d6af3c5a14a039e149448e86ca31844161357d
Author: Bjoern Schiessle <schiessle at owncloud.com>
Date:   Thu Dec 5 17:25:01 2013 +0100

    get owner from share item, if we expire a share while the user updates his /Shared folder than the owner is different from the currently logged in user
---
 apps/files_sharing/lib/updater.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php
index 44ebb5c..23ebc9f 100644
--- a/apps/files_sharing/lib/updater.php
+++ b/apps/files_sharing/lib/updater.php
@@ -112,8 +112,12 @@ class Shared_Updater {
 	 */
 	static public function shareHook($params) {
 		if ($params['itemType'] === 'file' || $params['itemType'] === 'folder') {
-			$uidOwner = \OCP\User::getUser();
-			$users = \OCP\Share::getUsersItemShared($params['itemType'], $params['fileSource'], $uidOwner, true);
+			if (isset($params['uidOwner'])) {
+				$uidOwner = $params['uidOwner'];
+			} else {
+				$uidOwner = \OCP\User::getUser();
+			}
+			$users = \OCP\Share::getUsersItemShared($params['itemType'], $params['fileSource'], $uidOwner, true, false);
 			if (!empty($users)) {
 				while (!empty($users)) {
 					$reshareUsers = array();

-- 
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