Skip to content

Commit 01e3234

Browse files
committed
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 34ca6bd commit 01e3234

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
@@ -1108,6 +1108,7 @@ public function getAccessList($nodes, $currentAccess): array {
11081108
));
11091109
$cursor = $qb->executeQuery();
11101110

1111+
$public = $cursor->rowCount() > 0;
11111112
$mail = [];
11121113
while ($row = $cursor->fetch()) {
11131114
if ($currentAccess === false) {
@@ -1121,7 +1122,7 @@ public function getAccessList($nodes, $currentAccess): array {
11211122
}
11221123
$cursor->closeCursor();
11231124

1124-
return ['public' => $mail];
1125+
return ['public' => $public, 'mail' => $mail];
11251126
}
11261127

11271128
public function getAllShares(): iterable {

0 commit comments

Comments
 (0)