diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-18 17:35:56 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-23 16:33:44 +0200 |
commit | 6ae761d94607432b4c2a76276f7a84673f312c62 (patch) | |
tree | df8198b41ec45d7a6545452997681502a6a474d1 | |
parent | dd972f65a8271ddcc4d253e87f9dbaeaba95941f (diff) | |
download | nextcloud-server-6ae761d94607432b4c2a76276f7a84673f312c62.tar.gz nextcloud-server-6ae761d94607432b4c2a76276f7a84673f312c62.zip |
keep a list of users we already checked to avoid loops
-rw-r--r-- | apps/files_sharing/lib/updater.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php index 8945da41e3d..2b4c799cf19 100644 --- a/apps/files_sharing/lib/updater.php +++ b/apps/files_sharing/lib/updater.php @@ -32,19 +32,19 @@ class Shared_Updater { $uid = \OCP\User::getUser(); $uidOwner = \OC\Files\Filesystem::getOwner($target); $info = \OC\Files\Filesystem::getFileInfo($target); - $currentOwner = $uidOwner; + $checkedUser = array($uidOwner); // Correct Shared folders of other users shared with $users = \OCP\Share::getUsersItemShared('file', $info['fileid'], $currentOwner, true); if (!empty($users)) { while (!empty($users)) { $reshareUsers = array(); foreach ($users as $user) { - if ( $user !== $currentOwner ) { + if ( in_array($user, $checkedUser) ) { $etag = \OC\Files\Filesystem::getETag(''); \OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag); // Look for reshares $reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $info['fileid'], $user, true)); - $currentOwner = $user; + $checkedUser[] = $user; } } $users = $reshareUsers; |