diff options
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 (); |
