aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorAdam Serbinski <adam@serbinski.com>2024-03-21 15:26:30 -0400
committerAdam Serbinski <37986043+ASerbinski@users.noreply.github.com>2024-03-21 18:25:31 -0400
commitf45eb75e3de1d82695f38f49f28e69278b7f9dbb (patch)
tree1fa6f11932c0e8c24c19cb695aa3111968d4f741 /apps
parent01e32340af1d01ace001e2f3c39f16d9f6cccd6d (diff)
downloadnextcloud-server-f45eb75e3de1d82695f38f49f28e69278b7f9dbb.tar.gz
nextcloud-server-f45eb75e3de1d82695f38f49f28e69278b7f9dbb.zip
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>
Diffstat (limited to 'apps')
-rw-r--r--apps/sharebymail/lib/ShareByMailProvider.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php
index e7f1db25a9b..f1bb3fe94ca 100644
--- a/apps/sharebymail/lib/ShareByMailProvider.php
+++ b/apps/sharebymail/lib/ShareByMailProvider.php
@@ -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 {