summaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2014-03-09 21:45:25 -0400
committerGravatar Alexis Degrugillier <github@ainw.org> 2014-03-09 21:45:25 -0400
commit3083af6288f23ba6986232798fde67b91517f287 (patch)
treec0fca002909eeae204e6a61b5a334bf5b65d71ad /app/Controllers/feedController.php
parentc3cac60b319189017c38b7d5e1d09f51ded96d0e (diff)
Enhance feed adding popup
I added a new option in the category select. It allows the user to add dynamically a new category and add the feed to the newly created category. See #356
Diffstat (limited to 'app/Controllers/feedController.php')
-rwxr-xr-xapp/Controllers/feedController.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index c718fcd5c..9996725e4 100755
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -30,6 +30,14 @@ class FreshRSS_feed_Controller extends Minz_ActionController {
$url = Minz_Request::param ('url_rss');
$cat = Minz_Request::param ('category', false);
+ if ($cat === 'nc') {
+ $new_cat = Minz_Request::param ('new_category');
+ if (empty($new_cat['name'])) {
+ $cat = false;
+ } else {
+ $cat = $this->catDAO->addCategory($new_cat);
+ }
+ }
if ($cat === false) {
$def_cat = $this->catDAO->getDefault ();
$cat = $def_cat->id ();