From 5faa7aaf66aa2e762922b293cb9b7293a5003a7d Mon Sep 17 00:00:00 2001 From: Django Janny Date: Fri, 2 Feb 2018 13:59:48 +0100 Subject: Trim spaces from user given url --- app/Controllers/feedController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 884172112..985b943d2 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -39,12 +39,14 @@ class FreshRSS_feed_Controller extends Minz_ActionController { * @throws FreshRSS_Feed_Exception * @throws Minz_FileNotExistException */ - public static function addFeed($url, $title = '', $cat_id = 0, $new_cat_name = '', $http_auth = '') { + public static function addFeed($param_url, $title = '', $cat_id = 0, $new_cat_name = '', $http_auth = '') { FreshRSS_UserDAO::touch(); @set_time_limit(300); $catDAO = new FreshRSS_CategoryDAO(); + $url = trim($param_url); + $cat = null; if ($new_cat_name != '') { $new_cat_id = $catDAO->addCategory(array('name' => $new_cat_name)); -- cgit v1.2.3 From 80168545eaa9e0183e72931ff7e50bfff36d7c33 Mon Sep 17 00:00:00 2001 From: Django Janny Date: Mon, 5 Feb 2018 20:48:16 +0100 Subject: param name --- app/Controllers/feedController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/Controllers/feedController.php') diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 985b943d2..7f66b10db 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -39,13 +39,13 @@ class FreshRSS_feed_Controller extends Minz_ActionController { * @throws FreshRSS_Feed_Exception * @throws Minz_FileNotExistException */ - public static function addFeed($param_url, $title = '', $cat_id = 0, $new_cat_name = '', $http_auth = '') { + public static function addFeed($url, $title = '', $cat_id = 0, $new_cat_name = '', $http_auth = '') { FreshRSS_UserDAO::touch(); @set_time_limit(300); $catDAO = new FreshRSS_CategoryDAO(); - $url = trim($param_url); + $url = trim($url); $cat = null; if ($new_cat_name != '') { -- cgit v1.2.3