aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-05-19 21:30:40 +0200
committerGravatar GitHub <noreply@github.com> 2022-05-19 21:30:40 +0200
commitf5aaf5f46076e0ac11ab52ef2ea940fd789ff174 (patch)
treedce366428ef809022d62eee3dd6601083ffa2e0c /app/Controllers/feedController.php
parentc1eae578986d5e0d1d9dc8ad1c35e03d8d6f4986 (diff)
New limit option when reloading a feed (#4370)
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php6
1 files changed, 3 insertions, 3 deletions
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;