diff options
| author | 2013-04-28 14:18:34 +0200 | |
|---|---|---|
| committer | 2013-04-28 14:18:34 +0200 | |
| commit | 1bee8ad9a7c02c0f53d1f334467cb6d1e5044511 (patch) | |
| tree | 2d983bea4e2a0f654ede6b74251cf9e83ec0fd39 /app/controllers/configureController.php | |
| parent | 57f657c04b89c54e6a6b3995a715acfc84a664a7 (diff) | |
Flux déplacés de catégories lors de la suppression de la leur (issue #28)
Diffstat (limited to 'app/controllers/configureController.php')
| -rwxr-xr-x | app/controllers/configureController.php | 6 |
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]); } } |
