mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-19 19:42:59 -04:00
Fix count unreads in SQLite (#2009)
* Fix count unreads in SQLite Was wrong in e.g. `./cli/user-info.php` because UNION output order in MySQL and SQLite is differents... * Changelog 2009
This commit is contained in:
committed by
GitHub
parent
c24bf33e58
commit
c65f535890
@@ -14,6 +14,7 @@
|
||||
* Fix Fever API to allow 32-bit architectures [#1962](https://github.com/FreshRSS/FreshRSS/issues/1962)
|
||||
* Fix CSS font bug for *Origine-compact* theme [#1990](https://github.com/FreshRSS/FreshRSS/issues/1990)
|
||||
* Fix last user activity for SQLite and PostgreSQL [#2008](https://github.com/FreshRSS/FreshRSS/pull/2008)
|
||||
* Fix article counts with SQLite [#2009](https://github.com/FreshRSS/FreshRSS/pull/2009)
|
||||
* Security
|
||||
* Avoid feed credentials in logs [#1949](https://github.com/FreshRSS/FreshRSS/pull/1949)
|
||||
* UI
|
||||
|
||||
@@ -909,6 +909,7 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
|
||||
$stm = $this->bd->prepare($sql);
|
||||
$stm->execute();
|
||||
$res = $stm->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||
rsort($res);
|
||||
$all = empty($res[0]) ? 0 : $res[0];
|
||||
$unread = empty($res[1]) ? 0 : $res[1];
|
||||
return array('all' => $all, 'unread' => $unread, 'read' => $all - $unread);
|
||||
@@ -963,6 +964,7 @@ SQL;
|
||||
$stm = $this->bd->prepare($sql);
|
||||
$stm->execute(array(':priority_normal' => FreshRSS_Feed::PRIORITY_NORMAL));
|
||||
$res = $stm->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||
rsort($res);
|
||||
$all = empty($res[0]) ? 0 : $res[0];
|
||||
$unread = empty($res[1]) ? 0 : $res[1];
|
||||
return array('all' => $all, 'unread' => $unread, 'read' => $all - $unread);
|
||||
|
||||
Reference in New Issue
Block a user