From 000ba6484f6789d9eecef303d031916cdc433827 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 6 Dec 2016 23:37:57 +0100 Subject: When grouping shares, sort by stime then id (#26777) If share times are equal, the first share should still win instead of having the shares swapped. Signed-off-by: Lukas Reschke --- apps/files_sharing/lib/MountProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_sharing') diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index 40d2fb27535..5c5d57057b2 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -123,7 +123,7 @@ class MountProvider implements IMountProvider { // sort by stime, the super share will be based on the least recent share foreach ($tmp as &$tmp2) { @usort($tmp2, function($a, $b) { - if ($a->getShareTime() < $b->getShareTime()) { + if ($a->getShareTime() <= $b->getShareTime()) { return -1; } return 1; -- cgit v1.2.3