diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-03-20 12:45:24 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-03-25 12:32:56 +0100 |
commit | 102120f105fd0f88349e3202024fca7c765e3587 (patch) | |
tree | 5154a7695ba700497710c78883c0d9cf29ca27f1 /apps | |
parent | 5924d1d95c09fef92a71c94c813dfce2372bbb91 (diff) | |
download | nextcloud-server-102120f105fd0f88349e3202024fca7c765e3587.tar.gz nextcloud-server-102120f105fd0f88349e3202024fca7c765e3587.zip |
skip update if the recipient is the same user as the owner, otherwise we run in a infinite loop for group shares
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/updater.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/files_sharing/lib/updater.php b/apps/files_sharing/lib/updater.php index 73e7808f24a..221aaee5421 100644 --- a/apps/files_sharing/lib/updater.php +++ b/apps/files_sharing/lib/updater.php @@ -38,10 +38,12 @@ class Shared_Updater { while (!empty($users)) { $reshareUsers = array(); foreach ($users as $user) { - $etag = \OC\Files\Filesystem::getETag(''); + if ( $user !== $uidOwner ) { + $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)); + } } $users = $reshareUsers; } @@ -88,10 +90,12 @@ class Shared_Updater { while (!empty($users)) { $reshareUsers = array(); foreach ($users as $user) { - $etag = \OC\Files\Filesystem::getETag(''); - \OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag); - // Look for reshares - $reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $params['fileSource'], $user, true)); + if ($user !== $uidOwner) { + $etag = \OC\Files\Filesystem::getETag(''); + \OCP\Config::setUserValue($user, 'files_sharing', 'etag', $etag); + // Look for reshares + $reshareUsers = array_merge($reshareUsers, \OCP\Share::getUsersItemShared('file', $params['fileSource'], $user, true)); + } } $users = $reshareUsers; } |