Skip to content

Commit e6f987d

Browse files
ASerbinskikesselb
authored andcommitted
ShareByMailProvider: getAccessList: set both array keys 'public' and 'mail'
To preserve prior behaviour where 'public' was set 'true' if there are any mail recipients. The 'mail' key will be an array of email recipients. Signed-off-by: Adam Serbinski <adam@serbinski.com>
1 parent a631c6c commit e6f987d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/sharebymail/lib/ShareByMailProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,7 @@ public function getAccessList($nodes, $currentAccess) {
12231223
));
12241224
$cursor = $qb->executeQuery();
12251225

1226+
$public = $cursor->rowCount() > 0;
12261227
$mail = [];
12271228
while ($row = $cursor->fetch()) {
12281229
if ($currentAccess === false) {
@@ -1236,7 +1237,7 @@ public function getAccessList($nodes, $currentAccess) {
12361237
}
12371238
$cursor->closeCursor();
12381239

1239-
return ['public' => $mail];
1240+
return ['public' => $public, 'mail' => $mail];
12401241
}
12411242

12421243
public function getAllShares(): iterable {

0 commit comments

Comments
 (0)