Browse Source

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>
tags/v29.0.0beta6
Adam Serbinski 1 year ago
parent
commit
01e32340af
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      apps/sharebymail/lib/ShareByMailProvider.php

+ 2
- 1
apps/sharebymail/lib/ShareByMailProvider.php 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 {

Loading…
Cancel
Save