diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-09-04 16:17:27 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-09-04 16:17:27 +0200 |
commit | e1a79cd651850e972e27f05a6667dcd088aa1bff (patch) | |
tree | bea3f581de9ae6729d903119d0626fb4da682f0e /apps/files_sharing/lib | |
parent | f6df37e0ccc5938671a8af6756ad2a972d0aa25f (diff) | |
download | nextcloud-server-e1a79cd651850e972e27f05a6667dcd088aa1bff.tar.gz nextcloud-server-e1a79cd651850e972e27f05a6667dcd088aa1bff.zip |
Avoid re-propagation of shares during one propagation run
* fix was proposed by @nickvergessen
Diffstat (limited to 'apps/files_sharing/lib')
-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]); } } |