summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2015-09-04 16:34:35 +0200
committerRobin Appelman <robin@icewind.nl>2015-09-04 16:34:35 +0200
commitaf5cfe585c61f85ea615d903c5d76914cdc0a637 (patch)
treebea3f581de9ae6729d903119d0626fb4da682f0e
parentf6df37e0ccc5938671a8af6756ad2a972d0aa25f (diff)
parente1a79cd651850e972e27f05a6667dcd088aa1bff (diff)
downloadnextcloud-server-af5cfe585c61f85ea615d903c5d76914cdc0a637.tar.gz
nextcloud-server-af5cfe585c61f85ea615d903c5d76914cdc0a637.zip
Merge pull request #18832 from owncloud/fix-infinite-loop-share-propagation
Avoid re-propagation of shares during one propagation run
-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]);
}
}
color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
{ "translations": {
    "Sharing %s failed, because this item is already shared with %s" : "Compartir %s falló, porque esti elementu yá ta compartiéndose con %s"
},"pluralForm" :"nplurals=2; plural=(n != 1);"
}