diff options
Diffstat (limited to 'app/Controllers/statsController.php')
| -rw-r--r-- | app/Controllers/statsController.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/Controllers/statsController.php b/app/Controllers/statsController.php index c5120f479..cd9a247c4 100644 --- a/app/Controllers/statsController.php +++ b/app/Controllers/statsController.php @@ -86,12 +86,12 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { * but shows the stats idle page */ public function feedAction(): void { - $id = '' . Minz_Request::param('id', ''); - $ajax = '' . Minz_Request::param('ajax', ''); + $id = Minz_Request::paramInt('id'); + $ajax = Minz_Request::paramBoolean('ajax'); if ($ajax) { - $url_redirect = array('c' => 'subscription', 'a' => 'feed', 'params' => array('id' => $id, 'from' => 'stats', 'ajax' => $ajax)); + $url_redirect = array('c' => 'subscription', 'a' => 'feed', 'params' => array('id' => (string)$id, 'from' => 'stats', 'ajax' => (string)$ajax)); } else { - $url_redirect = array('c' => 'subscription', 'a' => 'feed', 'params' => array('id' => $id, 'from' => 'stats')); + $url_redirect = array('c' => 'subscription', 'a' => 'feed', 'params' => array('id' => (string)$id, 'from' => 'stats')); } Minz_Request::forward($url_redirect, true); } @@ -174,9 +174,9 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { $this->view->idleFeeds = $idleFeeds; $this->view->feeds = $feed_dao->listFeeds(); - $id = Minz_Request::param('id'); + $id = Minz_Request::paramInt('id'); $this->view->displaySlider = false; - if (false !== $id) { + if ($id !== 0) { $this->view->displaySlider = true; $feedDAO = FreshRSS_Factory::createFeedDao(); $this->view->feed = $feedDAO->searchById($id); @@ -202,7 +202,7 @@ class FreshRSS_stats_Controller extends FreshRSS_ActionController { FreshRSS_View::appendScript(Minz_Url::display('/scripts/vendor/chart.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/vendor/chart.min.js'))); - $id = (int)(Minz_Request::param('id')); + $id = Minz_Request::paramInt('id'); if ($id === 0) { $id = null; } |
