diff options
Diffstat (limited to 'app/Models/EntryDAO.php')
| -rw-r--r-- | app/Models/EntryDAO.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index 8d32e86f9..3ef3254b0 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -1331,11 +1331,13 @@ SQL; public function count(?int $minPriority = null): int { $sql = 'SELECT COUNT(e.id) AS count FROM `_entry` e'; + $values = []; if ($minPriority !== null) { $sql .= ' INNER JOIN `_feed` f ON e.id_feed=f.id'; $sql .= ' WHERE f.priority > :priority'; + $values[':priority'] = $minPriority; } - $res = $this->fetchColumn($sql, 0, [':priority' => $minPriority]); + $res = $this->fetchColumn($sql, 0, $values); return isset($res[0]) ? (int)($res[0]) : -1; } |
