diff options
| author | 2015-01-18 12:49:49 +0100 | |
|---|---|---|
| committer | 2015-01-18 12:49:49 +0100 | |
| commit | 517d5aa9c52694b21f66d429085348d2e4fd10d2 (patch) | |
| tree | aacff028dd77300e9f4798b1ecce27f009e35e18 /app/Controllers/subscriptionController.php | |
| parent | 9e406394950b6df386918fa5f21ff110d726cd08 (diff) | |
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
Diffstat (limited to 'app/Controllers/subscriptionController.php')
| -rw-r--r-- | app/Controllers/subscriptionController.php | 7 |
1 files changed, 4 insertions, 3 deletions
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); } } } |
