aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers')
-rw-r--r--app/Controllers/feedController.php7
-rw-r--r--app/Controllers/statsController.php2
2 files changed, 6 insertions, 3 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index cc560a224..be86afb2d 100644
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -64,7 +64,6 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
if ($cat === null) {
$catDAO->checkDefault();
}
- $cat_id = $cat === null ? FreshRSS_CategoryDAO::DEFAULTCATEGORYID : $cat->id();
$feed = new FreshRSS_Feed($url); //Throws FreshRSS_BadUrl_Exception
$title = trim($title);
@@ -74,7 +73,11 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
$feed->_kind($kind);
$feed->_attributes($attributes);
$feed->_httpAuth($http_auth);
- $feed->_categoryId($cat_id);
+ if ($cat === null) {
+ $feed->_categoryId(FreshRSS_CategoryDAO::DEFAULTCATEGORYID);
+ } else {
+ $feed->_category($cat);
+ }
switch ($kind) {
case FreshRSS_Feed::KIND_RSS:
case FreshRSS_Feed::KIND_RSS_FORCED:
diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php
index 4ecd7fa2b..f40f0dd29 100644
--- a/app/Controllers/statsController.php
+++ b/app/Controllers/statsController.php
@@ -221,7 +221,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController {
$id = null;
}
- $this->view->categories = $categoryDAO->listCategories() ?: [];
+ $this->view->categories = $categoryDAO->listCategories(true) ?: [];
$this->view->feed = $id === null ? null : $feedDAO->searchById($id);
$this->view->days = $statsDAO->getDays();
$this->view->months = $statsDAO->getMonths();