aboutsummaryrefslogtreecommitdiff
path: root/app/controllers/configureController.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/configureController.php')
-rwxr-xr-xapp/controllers/configureController.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/configureController.php b/app/controllers/configureController.php
index f4d1a38e7..d6d210099 100755
--- a/app/controllers/configureController.php
+++ b/app/controllers/configureController.php
@@ -11,8 +11,11 @@ class configureController extends ActionController {
}
public function categorizeAction () {
+ $feedDAO = new FeedDAO ();
$catDAO = new CategoryDAO ();
$catDAO->checkDefault ();
+ $defaultCategory = $catDAO->getDefault ();
+ $defaultId = $defaultCategory->id ();
if (Request::isPost ()) {
$cats = Request::param ('categories', array ());
@@ -27,7 +30,8 @@ class configureController extends ActionController {
'color' => $cat->color ()
);
$catDAO->updateCategory ($ids[$key], $values);
- } elseif ($ids[$key] != '000000') {
+ } elseif ($ids[$key] != $defaultId) {
+ $feedDAO->changeCategory ($ids[$key], $defaultId);
$catDAO->deleteCategory ($ids[$key]);
}
}