Allow feed to be actualized after being truncated (#2862)

Before, on had to wait for the cache to expire before being able to
refresh a feed that had been truncated via the Web interface.
Now, one can "delete all articles" and hit "actualize" imediately after
without problem.
Useful for testing filters, debugging e.g.
https://github.com/FreshRSS/FreshRSS/issues/2806
This commit is contained in:
Alexandre Alapetite
2020-03-31 14:15:51 +02:00
committed by GitHub
parent ecd05088fa
commit cedbbff582

View File

@@ -407,7 +407,7 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
$affected = $stm->rowCount();
$sql = 'UPDATE `_feed` '
. 'SET `cache_nbEntries`=0, `cache_nbUnreads`=0 WHERE id=:id';
. 'SET `cache_nbEntries`=0, `cache_nbUnreads`=0, `lastUpdate`=0 WHERE id=:id';
$stm = $this->pdo->prepare($sql);
$stm->bindParam(':id', $id, PDO::PARAM_INT);
if (!($stm && $stm->execute())) {