diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-04-23 18:34:06 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-04-27 14:07:16 +0200 |
commit | 32067f9e8043ee5ac8e6735743a94c146bba6c4c (patch) | |
tree | 341553178fe3ddf8eccd6661ec7a166f1c6051aa /apps | |
parent | 83b8ac0d7b90840ac3d22e95a442d3f5db413ea6 (diff) | |
download | nextcloud-server-32067f9e8043ee5ac8e6735743a94c146bba6c4c.tar.gz nextcloud-server-32067f9e8043ee5ac8e6735743a94c146bba6c4c.zip |
use microtime to prevent race conditions
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/lib/propagation/recipientpropagator.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/propagation/recipientpropagator.php b/apps/files_sharing/lib/propagation/recipientpropagator.php index e1b3523ca68..9c9fe2bedbf 100644 --- a/apps/files_sharing/lib/propagation/recipientpropagator.php +++ b/apps/files_sharing/lib/propagation/recipientpropagator.php @@ -52,7 +52,7 @@ class RecipientPropagator { */ public function propagateDirtyMountPoints(array $shares, $time = null) { if ($time === null) { - $time = time(); + $time = microtime(true); } $dirtyShares = $this->getDirtyShares($shares); foreach ($dirtyShares as $share) { @@ -88,7 +88,7 @@ class RecipientPropagator { */ public function markDirty($share, $time = null) { if ($time === null) { - $time = time(); + $time = microtime(true); } $this->config->setAppValue('files_sharing', $share['id'], $time); } @@ -104,7 +104,7 @@ class RecipientPropagator { $shares = Share::getAllSharesForFileId($entry['fileid']); foreach ($shares as $share) { // propagate down the share tree - $this->markDirty($share, time()); + $this->markDirty($share, microtime(true)); // propagate up the share tree $user = $share['uid_owner']; |