From adc33811c3c9513ca56dfa5e57169a5a1df106db Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 14 Sep 2013 17:48:33 +0200 Subject: Fix issue #158 : ajout premier flux fonctionne MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La catégorie par défaut est bien mise par défaut pour le premier flux --- app/controllers/feedController.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'app/controllers/feedController.php') 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 (); -- cgit v1.2.3