Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
ShareByMailProvider: getAccessList: set correct value for 'public'
PDOStatement::rowCount behavior is undefined for SELECT statements
for some database types, therefore manually set the value for 'public'
based on actual results fetched.

Signed-off-by: Adam Serbinski <adam@serbinski.com>
  • Loading branch information
ASerbinski committed Mar 21, 2024
commit f45eb75e3de1d82695f38f49f28e69278b7f9dbb
3 changes: 2 additions & 1 deletion apps/sharebymail/lib/ShareByMailProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -1108,9 +1108,10 @@ public function getAccessList($nodes, $currentAccess): array {
));
$cursor = $qb->executeQuery();

$public = $cursor->rowCount() > 0;
$public = false;
$mail = [];
while ($row = $cursor->fetch()) {
$public = true;
if ($currentAccess === false) {
$mail[] = $row['share_with'];
} else {
Expand Down