[Pkg-owncloud-commits] [owncloud] 104/215: use microtime to prevent race conditions

David Prévot taffit at moszumanska.debian.org
Tue May 5 01:01:30 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 32067f9e8043ee5ac8e6735743a94c146bba6c4c
Author: Robin Appelman <icewind at owncloud.com>
Date:   Thu Apr 23 18:34:06 2015 +0200

    use microtime to prevent race conditions
---
 apps/files_sharing/lib/propagation/recipientpropagator.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/apps/files_sharing/lib/propagation/recipientpropagator.php b/apps/files_sharing/lib/propagation/recipientpropagator.php
index e1b3523..9c9fe2b 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'];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list