From 517d5aa9c52694b21f66d429085348d2e4fd10d2 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sun, 18 Jan 2015 12:49:49 +0100 Subject: Fix feed update with MySQL/MariaDB - updateFeed() returns 0 if nothing changes so the test was false. - Redirection in case of error is better now by redirecting on the right feed Fix https://github.com/FreshRSS/FreshRSS/issues/755 --- app/Controllers/subscriptionController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/Controllers') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index e98b1f640..333565faf 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -102,13 +102,14 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { invalidateHttpCache(); - if ($feedDAO->updateFeed($id, $values)) { + $url_redirect = array('c' => 'subscription', 'params' => array('id' => $id)); + if ($feedDAO->updateFeed($id, $values) !== false) { $this->view->feed->_category($cat); $this->view->feed->faviconPrepare(); - Minz_Request::good(_t('feedback.sub.feed.updated'), array('c' => 'subscription', 'params' => array('id' => $id))); + Minz_Request::good(_t('feedback.sub.feed.updated'), $url_redirect); } else { - Minz_Request::bad(_t('feedback.sub.feed.error'), array('c' => 'subscription')); + Minz_Request::bad(_t('feedback.sub.feed.error'), $url_redirect); } } } -- cgit v1.2.3