From 532d229d3396817f702c1ecae79fb7f9bdad9a64 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 10 May 2025 23:17:25 +0200 Subject: Fix newest articles not shown (#7577) * Fix newest articles not shown Case when processing was faster than 1 second. fix https://github.com/FreshRSS/FreshRSS/issues/7412 Regression from https://github.com/FreshRSS/FreshRSS/pull/7149 * Simplify uTimeString() PHPStan has become a bit smarter --- app/Models/EntryDAO.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Models/EntryDAO.php') diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php index f6c327364..f9dc9fd82 100644 --- a/app/Models/EntryDAO.php +++ b/app/Models/EntryDAO.php @@ -493,7 +493,7 @@ SQL; ?FreshRSS_BooleanSearch $filters = null, int $state = 0, bool $is_read = true) { FreshRSS_UserDAO::touch(); if ($idMax == '0') { - $idMax = time() . '000000'; + $idMax = uTimeString(); Minz_Log::debug('Calling markReadEntries(0) is deprecated!'); } @@ -544,7 +544,7 @@ SQL; public function markReadCat(int $id, string $idMax = '0', ?FreshRSS_BooleanSearch $filters = null, int $state = 0, bool $is_read = true): int|false { FreshRSS_UserDAO::touch(); if ($idMax == '0') { - $idMax = time() . '000000'; + $idMax = uTimeString(); Minz_Log::debug('Calling markReadCat(0) is deprecated!'); } @@ -585,7 +585,7 @@ SQL; public function markReadFeed(int $id_feed, string $idMax = '0', ?FreshRSS_BooleanSearch $filters = null, int $state = 0, bool $is_read = true): int|false { FreshRSS_UserDAO::touch(); if ($idMax == '0') { - $idMax = time() . '000000'; + $idMax = uTimeString(); Minz_Log::debug('Calling markReadFeed(0) is deprecated!'); } $hadTransaction = $this->pdo->inTransaction(); @@ -640,7 +640,7 @@ SQL; int $state = 0, bool $is_read = true) { FreshRSS_UserDAO::touch(); if ($idMax == '0') { - $idMax = time() . '000000'; + $idMax = uTimeString(); Minz_Log::debug('Calling markReadTag(0) is deprecated!'); } -- cgit v1.2.3