From 7d00ad8ed75cae5dafd4ac1f2cc6e15e94333628 Mon Sep 17 00:00:00 2001 From: maTh Date: Tue, 22 Mar 2022 23:09:50 +0100 Subject: Improve: manage feed in view within a slider (#4226) * it works * small improvements * Update slider.js * fixed JS syntax * slider.js included in main.js * fix syntax * delete including of slider.js * Update extra.js --- app/Controllers/subscriptionController.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'app/Controllers/subscriptionController.php') diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 0b8c62128..60a433f50 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -225,11 +225,23 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController { invalidateHttpCache(); $from = Minz_Request::param('from'); - if ($from === false) { - $url_redirect = array('c' => 'subscription', 'params' => array('id' => $id)); - } else { - $url_redirect = array('c' => 'stats', 'a' => 'idle', 'params' => array('id' => $id, 'from' => 'stats')); + switch ($from) { + case 'stats': + $url_redirect = array('c' => 'stats', 'a' => 'idle', 'params' => array('id' => $id, 'from' => 'stats')); + break; + case 'normal': + case 'reader': + $get = Minz_Request::param('get'); + if ($get) { + $url_redirect = array('c' => 'index', 'a' => $from, 'params' => array('get' => $get)); + } else { + $url_redirect = array('c' => 'index', 'a' => $from); + } + break; + default: + $url_redirect = array('c' => 'subscription', 'params' => array('id' => $id)); } + if ($feedDAO->updateFeed($id, $values) !== false) { $feed->_category($cat); $feed->faviconPrepare(); -- cgit v1.2.3