From bb61f698e8d3dcc980ea2a6a7c46d4905a1608c6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 17 Aug 2024 16:25:40 +0200 Subject: Fix HTTP cache of main page (#6719) Revert bug introduce by https://github.com/FreshRSS/FreshRSS/pull/3096 in which username was always null, preventing HTTP cache from working and always returning 200 instead of 304. Discovered when checking https://github.com/FreshRSS/FreshRSS/pull/6718 --- app/Models/EntryDAOSQLite.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/EntryDAOSQLite.php') diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index 364d0c153..d6364fec9 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -83,7 +83,6 @@ SQL; */ #[\Override] public function markRead($ids, bool $is_read = true) { - FreshRSS_UserDAO::touch(); if (is_array($ids)) { //Many IDs at once (used by API) //if (true) { //Speed heuristics //TODO: Not implemented yet for SQLite (so always call IDs one by one) $affected = 0; @@ -93,6 +92,7 @@ SQL; return $affected; //} } else { + FreshRSS_UserDAO::touch(); $this->pdo->beginTransaction(); $sql = 'UPDATE `_entry` SET is_read=? WHERE id=? AND is_read=?'; $values = [$is_read ? 1 : 0, $ids, $is_read ? 0 : 1]; -- cgit v1.2.3