diff options
| author | 2021-03-26 19:13:23 +0100 | |
|---|---|---|
| committer | 2021-03-26 19:13:23 +0100 | |
| commit | eeff1a17b0ae13c32560e9d1b59c6e82965f3e6d (patch) | |
| tree | 8224f828f2d9ea094f2a8f608c0eb1eef07793b1 /app/Models/FeedDAO.php | |
| parent | 49f920e19dff22e8026707d98cf93b556a2703a9 (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.php | 5 |
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); |
