diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-09-10 00:21:08 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-09-10 00:21:08 +0300 |
commit | 8d800e96357d4a5bc93498cf0b3eab4980cb8ada (patch) | |
tree | a28c4afcdb7c94ea435bfaa5918b09af81453a0c | |
parent | bef8dd41714f5fd797166c6f47549e360919be31 (diff) | |
parent | cbcbbd9423c72f1aa9efb5c6e2a8cda99e510a4c (diff) |
Merge pull request #18928 from owncloud/stable8.1-backport-18832
[stable8.1] Avoid re-propagation of shares during one propagation run
-rw-r--r-- | apps/files_sharing/lib/propagation/recipientpropagator.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/propagation/recipientpropagator.php b/apps/files_sharing/lib/propagation/recipientpropagator.php index 11764106861..420cacb3d2f 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]); } } |