From 247dfa6c1ba0f60b7cca63141c94d5754b2bd7e5 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 24 Jul 2021 19:25:59 +0200 Subject: Fix marking as read a label with SQLite (#3711) Cf. https://github.com/FreshRSS/FreshRSS/pull/3709#issuecomment-885334063 --- app/Models/EntryDAOSQLite.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app') diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index 82d7c099c..f0b9a318b 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -253,11 +253,11 @@ DROP TABLE IF EXISTS `tmp`; Minz_Log::debug('Calling markReadTag(0) is deprecated!'); } - $sql = 'UPDATE `_entry` e ' - . 'SET e.is_read = ? ' - . 'WHERE e.is_read <> ? AND e.id <= ? AND ' - . 'e.id IN (SELECT et.id_entry FROM `_entrytag` et ' - . ($id == '' ? '' : 'WHERE et.id = ?') + $sql = 'UPDATE `_entry` ' + . 'SET is_read = ? ' + . 'WHERE is_read <> ? AND id <= ? AND ' + . 'id IN (SELECT et.id_entry FROM `_entrytag` et ' + . ($id == '' ? '' : 'WHERE et.id_tag = ?') . ')'; $values = array($is_read ? 1 : 0, $is_read ? 1 : 0, $idMax); if ($id != '') { -- cgit v1.2.3