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>
This commit is contained in:
Adam Serbinski 2023-01-26 10:19:54 -05:00 committed by Adam Serbinski
parent 34ca6bd46a
commit 01e32340af

View file

@ -1108,6 +1108,7 @@ class ShareByMailProvider implements IShareProvider {
));
$cursor = $qb->executeQuery();
$public = $cursor->rowCount() > 0;
$mail = [];
while ($row = $cursor->fetch()) {
if ($currentAccess === false) {
@ -1121,7 +1122,7 @@ class ShareByMailProvider implements IShareProvider {
}
$cursor->closeCursor();
return ['public' => $mail];
return ['public' => $public, 'mail' => $mail];
}
public function getAllShares(): iterable {