summaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-25 00:37:34 +0200
committerGravatar GitHub <noreply@github.com> 2016-10-25 00:37:34 +0200
commit062c65d22878f2402e4add7c1758d794d46aff48 (patch)
tree99047b1a45f706d3c21bde799c6d2a59ebd18b30 /app/Controllers/feedController.php
parent4d6fdc589e89c2a7d4072b497d9dfd8504a1cb5c (diff)
parent2cbf307963c72c4f5cf18732bb581a88a46d668b (diff)
Merge pull request #1338 from Alkarex/cli
CLI: Command-Line Interface
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index ed3229687..c4115584a 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -40,9 +40,8 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
if ($cat == null) {
$catDAO->checkDefault();
- $cat = $catDAO->getDefault();
}
- $cat_id = $cat->id();
+ $cat_id = $cat == null ? FreshRSS_CategoryDAO::defaultCategoryId : $cat->id();
$feed = new FreshRSS_Feed($url); //Throws FreshRSS_BadUrl_Exception
$feed->_httpAuth($http_auth);
@@ -504,8 +503,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
}
if ($cat_id <= 1) {
$catDAO->checkDefault();
- $cat = $catDAO->getDefault();
- $cat_id = $cat->id();
+ $cat_id = FreshRSS_CategoryDAO::defaultCategoryId;
}
$feedDAO = FreshRSS_Factory::createFeedDao();