[Pkg-owncloud-commits] [owncloud] 09/18: Avoid re-propagation of shares during one propagation run
David Prévot
taffit at moszumanska.debian.org
Sat Sep 19 14:16:21 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 cbcbbd9423c72f1aa9efb5c6e2a8cda99e510a4c
Author: Morris Jobke <hey at morrisjobke.de>
Date: Fri Sep 4 16:17:27 2015 +0200
Avoid re-propagation of shares during one propagation run
* fix was proposed by @nickvergessen
---
apps/files_sharing/lib/propagation/recipientpropagator.php | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/apps/files_sharing/lib/propagation/recipientpropagator.php b/apps/files_sharing/lib/propagation/recipientpropagator.php
index 1176410..420cacb 100644
--- a/apps/files_sharing/lib/propagation/recipientpropagator.php
+++ b/apps/files_sharing/lib/propagation/recipientpropagator.php
@@ -126,7 +126,13 @@ class RecipientPropagator {
});
}
+ protected $propagatingIds = [];
+
public function propagateById($id) {
+ if (isset($this->propagatingIds[$id])) {
+ return;
+ }
+ $this->propagatingIds[$id] = true;
$shares = Share::getAllSharesForFileId($id);
foreach ($shares as $share) {
// propagate down the share tree
@@ -141,5 +147,7 @@ class RecipientPropagator {
$watcher->writeHook(['path' => $path]);
}
}
+
+ unset($this->propagatingIds[$id]);
}
}
--
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