summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-09-04 16:17:27 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-09-09 15:10:54 +0200
commitcbcbbd9423c72f1aa9efb5c6e2a8cda99e510a4c (patch)
tree67f143b1ff892accf13df3bc9907a11dd4642c07 /apps/files_sharing
parent5d433da1ae654fac67ddfb3b4b4b23677c99ce41 (diff)
downloadnextcloud-server-cbcbbd9423c72f1aa9efb5c6e2a8cda99e510a4c.tar.gz
nextcloud-server-cbcbbd9423c72f1aa9efb5c6e2a8cda99e510a4c.zip
Avoid re-propagation of shares during one propagation run
* fix was proposed by @nickvergessen
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/lib/propagation/recipientpropagator.php8
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]);
}
}