From 3083af6288f23ba6986232798fde67b91517f287 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 9 Mar 2014 21:45:25 -0400 Subject: 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 --- app/Controllers/feedController.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/Controllers/feedController.php') 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 (); -- cgit v1.2.3 From 608b3a8656d986ff177e97e968256bcbf6785c13 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Mon, 10 Mar 2014 20:16:41 +0100 Subject: Link to logs in case of error when adding new feed https://github.com/marienfressinaud/FreshRSS/issues/453 --- app/Controllers/feedController.php | 4 ++-- app/i18n/en.php | 2 +- app/i18n/fr.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 9996725e4..16516ad39 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -136,7 +136,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { Minz_Log::record ($e->getMessage (), Minz_Log::WARNING); $notif = array ( 'type' => 'bad', - 'content' => Minz_Translate::t ('internal_problem_feed') + 'content' => Minz_Translate::t ('internal_problem_feed', Minz_Url::display(array('a' => 'logs'))) ); Minz_Session::_param ('notification', $notif); } catch (Minz_FileNotExistException $e) { @@ -144,7 +144,7 @@ class FreshRSS_feed_Controller extends Minz_ActionController { Minz_Log::record ($e->getMessage (), Minz_Log::ERROR); $notif = array ( 'type' => 'bad', - 'content' => Minz_Translate::t ('internal_problem_feed') + 'content' => Minz_Translate::t ('internal_problem_feed', Minz_Url::display(array('a' => 'logs'))) ); Minz_Session::_param ('notification', $notif); } diff --git a/app/i18n/en.php b/app/i18n/en.php index 69247165f..7f95500ad 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -89,7 +89,7 @@ return array ( 'already_subscribed' => 'You have already subscribed to %s', 'feed_added' => 'RSS feed %s has been added', 'feed_not_added' => '%s could not be added', - 'internal_problem_feed' => 'The RSS feed could not be added. Check FressRSS logs for details.', + 'internal_problem_feed' => 'The RSS feed could not be added. Check FressRSS logs for details.', 'invalid_url' => 'URL %s is invalid', 'feed_actualized' => '%s has been updated', 'n_feeds_actualized' => '%d feeds have been updated', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index e364ed130..91daa4f51 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -89,7 +89,7 @@ return array ( 'already_subscribed' => 'Vous êtes déjà abonné à %s', 'feed_added' => 'Le flux %s a bien été ajouté', 'feed_not_added' => '%s n’a pas pu être ajouté', - 'internal_problem_feed' => 'Le flux n’a pas pu être ajouté. Consulter les logs de FreshRSS pour plus de détails.', + 'internal_problem_feed' => 'Le flux n’a pas pu être ajouté. Consulter les logs de FreshRSS pour plus de détails.', 'invalid_url' => 'L’url %s est invalide', 'feed_actualized' => '%s a été mis à jour', 'n_feeds_actualized' => '%d flux ont été mis à jour', -- cgit v1.2.3