diff options
author | kesselb <mail@danielkesselberg.de> | 2020-10-07 23:41:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-07 23:41:39 +0300 |
commit | 27c9139fda9d7bd300e56bcc41c22414312e22b4 (patch) | |
tree | 266316bd527582fae386e8d1c131181d15d205f3 | |
parent | 7608da6e6a860e5916d9fc5e137dfd72cd893892 (diff) | |
parent | 98fca7b99c9a1d83d48534a0eb213a9a33b36ef8 (diff) |
Merge pull request #248 from nextcloud/backport/246/stable19v19.0.4
[stable19] Fix num_shares_link_no_password for NC >= 15
-rw-r--r-- | lib/ShareStatistics.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ShareStatistics.php b/lib/ShareStatistics.php index 2244c2d..c1be78b 100644 --- a/lib/ShareStatistics.php +++ b/lib/ShareStatistics.php @@ -90,17 +90,17 @@ class ShareStatistics { /** * @param int $type - * @param bool $noShareWith + * @param bool $noPassword * @return int */ - protected function countShares($type, $noShareWith = false) { + protected function countShares($type, $noPassword = false) { $query = $this->connection->getQueryBuilder(); $query->selectAlias($query->createFunction('COUNT(*)'), 'num_entries') ->from('share') ->where($query->expr()->eq('share_type', $query->createNamedParameter($type))); - if ($noShareWith) { - $query->andWhere($query->expr()->isNull('share_with')); + if ($noPassword) { + $query->andWhere($query->expr()->isNull('password')); } $result = $query->execute(); |