aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers')
-rw-r--r--app/Controllers/categoryController.php7
-rwxr-xr-xapp/Controllers/feedController.php7
2 files changed, 14 insertions, 0 deletions
diff --git a/app/Controllers/categoryController.php b/app/Controllers/categoryController.php
index 977ce51be..ef8af7ed6 100644
--- a/app/Controllers/categoryController.php
+++ b/app/Controllers/categoryController.php
@@ -33,6 +33,13 @@ class FreshRSS_category_Controller extends Minz_ActionController {
$catDAO = new FreshRSS_CategoryDAO();
$url_redirect = array('c' => 'subscription', 'a' => 'index');
+ $limits = Minz_Configuration::limits();
+ $this->view->categories = $catDAO->listCategories(false);
+ if (count($this->view->categories) >= $limits['max_categories']) {
+ Minz_Request::bad(_t('over_max_categories', $limits['max_categories']), $url_redirect);
+ return;
+ }
+
if (Minz_Request::isPost()) {
invalidateHttpCache();
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);