From 76a2fb0231acf86d87cb6d8026e7f08936a21f15 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 28 Nov 2017 16:38:16 +0100 Subject: Only in case of $currentAccess the array uses the id as index Otherwise its a normal string[] with the user ids, in that case the array_merge did it's job just fine, apart from it not being deduplicated. The array+array is only needed when the user id is the key, so integer only user ids are kept as they are instead of being reindexed. Regression from 3820d6883dffcaa49deb1054ae0f32ab3d3e39b1 Signed-off-by: Joas Schilling --- lib/private/Share20/Manager.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index be019852ff3..46b47920ce1 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1407,7 +1407,13 @@ class Manager implements IManager { foreach ($tmp as $k => $v) { if (isset($al[$k])) { if (is_array($al[$k])) { - $al[$k] += $v; + if ($currentAccess) { + $al[$k] += $v; + } else { + $al[$k] = array_merge($al[$k], $v); + $al[$k] = array_unique($al[$k]); + $al[$k] = array_values($al[$k]); + } } else { $al[$k] = $al[$k] || $v; } -- cgit v1.2.3