Merge pull request #18832 from owncloud/fix-infinite-loop-share-propagation

Avoid re-propagation of shares during one propagation run
This commit is contained in:
Robin Appelman 2015-09-04 16:34:35 +02:00
commit af5cfe585c

View file

@ -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]);
}
}