diff options
| author | 2013-09-14 17:48:33 +0200 | |
|---|---|---|
| committer | 2013-09-14 17:48:33 +0200 | |
| commit | adc33811c3c9513ca56dfa5e57169a5a1df106db (patch) | |
| tree | fc76930a2221a807cd8373f8f02ebab639d19f83 /app/controllers/feedController.php | |
| parent | 31a6a13268023a2db5eba2445ee6c7db4a6d9623 (diff) | |
Fix issue #158 : ajout premier flux fonctionne
La catégorie par défaut est bien mise par défaut pour le premier flux
Diffstat (limited to 'app/controllers/feedController.php')
| -rwxr-xr-x | app/controllers/feedController.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/controllers/feedController.php b/app/controllers/feedController.php index 18a46f322..8cb4c31c2 100755 --- a/app/controllers/feedController.php +++ b/app/controllers/feedController.php @@ -9,14 +9,18 @@ class feedController extends ActionController { ); } - $catDAO = new CategoryDAO (); - $catDAO->checkDefault (); + $this->catDAO = new CategoryDAO (); + $this->catDAO->checkDefault (); } public function addAction () { if (Request::isPost ()) { $url = Request::param ('url_rss'); - $cat = Request::param ('category'); + $cat = Request::param ('category', false); + if ($cat === false) { + $def_cat = $this->catDAO->getDefault (); + $cat = $def_cat->id (); + } $user = Request::param ('username'); $pass = Request::param ('password'); $params = array (); |
