Skip to content

Commit

Permalink
ShareByMailProvider: getAccessList: set both array keys 'public' and …
Browse files Browse the repository at this point in the history
…'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 <[email protected]>
  • Loading branch information
ASerbinski committed Mar 21, 2024
1 parent 34ca6bd commit 01e3234
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/sharebymail/lib/ShareByMailProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,7 @@ public function getAccessList($nodes, $currentAccess): array {
));
$cursor = $qb->executeQuery();

$public = $cursor->rowCount() > 0;
$mail = [];
while ($row = $cursor->fetch()) {
if ($currentAccess === false) {
Expand All @@ -1121,7 +1122,7 @@ public function getAccessList($nodes, $currentAccess): array {
}
$cursor->closeCursor();

return ['public' => $mail];
return ['public' => $public, 'mail' => $mail];
}

public function getAllShares(): iterable {
Expand Down

0 comments on commit 01e3234

Please sign in to comment.