From c6f35ef51c2c536efb4f8e73603ae46b8512cc24 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 27 Oct 2014 21:45:30 +0100 Subject: Global limits for number of feeds and categories New 'limits' sub-array in config.php with 'max_feeds' and 'max_categories'. If the values are < 0, then it is the default value (16384). https://github.com/marienfressinaud/FreshRSS/issues/680 --- app/Controllers/feedController.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index c2859edf4..39e4b5761 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -68,6 +68,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController { 'params' => array(), ); + $limits = Minz_Configuration::limits(); + $this->view->feeds = $feedDAO->listFeeds(); + if (count($this->view->feeds) >= $limits['max_feeds']) { + Minz_Request::bad(_t('over_max_feeds', $limits['max_feeds']), $url_redirect); + return; + } + if (Minz_Request::isPost()) { @set_time_limit(300); -- cgit v1.2.3