mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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>
This commit is contained in:
parent
01e32340af
commit
f45eb75e3d
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue