aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/categoryController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-23 01:46:14 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-23 01:46:14 +0200
commit1b8eb6c7e732f1eda4fc8f22e847b363b016f857 (patch)
tree509c9024d8a31f70f1f76e6a9c93cad5b13a2713 /app/Controllers/categoryController.php
parent5b1b43ab57da6a7bc1599c224d47455b2e56d53d (diff)
CLI import ZIP/OPML/JSON for user
https://github.com/FreshRSS/FreshRSS/issues/1095 https://github.com/FreshRSS/FreshRSS/issues/851
Diffstat (limited to 'app/Controllers/categoryController.php')
-rw-r--r--app/Controllers/categoryController.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/Controllers/categoryController.php b/app/Controllers/categoryController.php
index e65c146de..922f92844 100644
--- a/app/Controllers/categoryController.php
+++ b/app/Controllers/categoryController.php
@@ -117,7 +117,6 @@ class FreshRSS_category_Controller extends Minz_ActionController {
public function deleteAction() {
$feedDAO = FreshRSS_Factory::createFeedDao();
$catDAO = new FreshRSS_CategoryDAO();
- $default_category = $catDAO->getDefault();
$url_redirect = array('c' => 'subscription', 'a' => 'index');
if (Minz_Request::isPost()) {
@@ -128,11 +127,11 @@ class FreshRSS_category_Controller extends Minz_ActionController {
Minz_Request::bad(_t('feedback.sub.category.no_id'), $url_redirect);
}
- if ($id === $default_category->id()) {
+ if ($id === FreshRSS_CategoryDAO::defaultCategoryId) {
Minz_Request::bad(_t('feedback.sub.category.not_delete_default'), $url_redirect);
}
- if ($feedDAO->changeCategory($id, $default_category->id()) === false) {
+ if ($feedDAO->changeCategory($id, FreshRSS_CategoryDAO::defaultCategoryId) === false) {
Minz_Request::bad(_t('feedback.sub.category.error'), $url_redirect);
}