From f5aaf5f46076e0ac11ab52ef2ea940fd789ff174 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Thu, 19 May 2022 21:30:40 +0200 Subject: New limit option when reloading a feed (#4370) --- app/Controllers/feedController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Controllers') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 4788f9639..49383342e 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -814,7 +814,8 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { @set_time_limit(300); //Get Feed ID. - $feed_id = Minz_Request::param('id'); + $feed_id = intval(Minz_Request::param('id', 0)); + $limit = intval(Minz_Request::param('reload_limit', 10)); $feedDAO = FreshRSS_Factory::createFeedDao(); $entryDAO = FreshRSS_Factory::createEntryDao(); @@ -831,8 +832,7 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController { self::actualizeFeed($feed_id, '', false); //Extract all feed entries from database, load complete content and store them back in database. - $entries = $entryDAO->listWhere('f', $feed_id, FreshRSS_Entry::STATE_ALL, 'DESC', 0); - //TODO: Parameter to limit the number of articles to reload + $entries = $entryDAO->listWhere('f', $feed_id, FreshRSS_Entry::STATE_ALL, 'DESC', $limit); //We need another DB connection in parallel for unbuffered streaming Minz_ModelPdo::$usesSharedPdo = false; -- cgit v1.2.3