aboutsummaryrefslogtreecommitdiff
path: root/app/Models/FeedDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-03-26 19:13:23 +0100
committerGravatar GitHub <noreply@github.com> 2021-03-26 19:13:23 +0100
commiteeff1a17b0ae13c32560e9d1b59c6e82965f3e6d (patch)
tree8224f828f2d9ea094f2a8f608c0eb1eef07793b1 /app/Models/FeedDAO.php
parent49f920e19dff22e8026707d98cf93b556a2703a9 (diff)
Suport standard HTTP 410 Gone (#3561)
When a feed returns an HTTP 410 Gone, mute the corresponding feed, i.e. stop refreshing it. Example of such feed, Les Décodeurs (Libération) https://rss.liberation.fr/rss/100893/
Diffstat (limited to 'app/Models/FeedDAO.php')
-rw-r--r--app/Models/FeedDAO.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php
index 43485451c..af599c2a6 100644
--- a/app/Models/FeedDAO.php
+++ b/app/Models/FeedDAO.php
@@ -192,6 +192,11 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
}
}
+ public function mute($id, $value = true) {
+ $sql = 'UPDATE `_feed` SET ttl=' . ($value ? '-' : '') . 'ABS(ttl) WHERE id=' . intval($id);
+ return $this->pdo->exec($sql);
+ }
+
public function changeCategory($idOldCat, $idNewCat) {
$catDAO = FreshRSS_Factory::createCategoryDao();
$newCat = $catDAO->searchById($idNewCat);