Skip to content

Commit 53bfa7c

Browse files
ASerbinskiAndyScherzinger
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 bfd789e commit 53bfa7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/sharebymail/lib/ShareByMailProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,7 @@ public function getAccessList($nodes, $currentAccess): array {
11071107
));
11081108
$cursor = $qb->executeQuery();
11091109

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

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

11261127
public function getAllShares(): iterable {

0 commit comments

Comments
 (0)