Просмотр исходного кода

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
Alexandre Alapetite 6 лет назад
Родитель
Сommit
cedbbff582
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/Models/FeedDAO.php

+ 1 - 1
app/Models/FeedDAO.php

@@ -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())) {