Browse Source

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>
tags/v29.0.0beta6
Adam Serbinski 2 months ago
parent
commit
f45eb75e3d
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,9 +1108,10 @@ class ShareByMailProvider implements IShareProvider {
));
$cursor = $qb->executeQuery();

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

Loading…
Cancel
Save