From 7d7bf8672854b13c03ec53b2eaeefc754a588bef Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Mon, 21 Jul 2014 11:34:07 +0200 Subject: [PATCH 1/2] [ticket/12883] Do not use basename() to get the search class in tidy_search PHPBB3-12883 --- phpBB/phpbb/cron/task/core/tidy_search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/cron/task/core/tidy_search.php b/phpBB/phpbb/cron/task/core/tidy_search.php index 2de744b7c1..2665d18799 100644 --- a/phpBB/phpbb/cron/task/core/tidy_search.php +++ b/phpBB/phpbb/cron/task/core/tidy_search.php @@ -55,7 +55,7 @@ class tidy_search extends \phpbb\cron\task\base public function run() { // Select the search method - $search_type = basename($this->config['search_type']); + $search_type = $this->config['search_type']; // We do some additional checks in the module to ensure it can actually be utilised $error = false; @@ -79,7 +79,7 @@ class tidy_search extends \phpbb\cron\task\base public function is_runnable() { // Select the search method - $search_type = basename($this->config['search_type']); + $search_type = $this->config['search_type']; return class_exists($search_type); } From 3bf04d715294aca3b89a4cd6a3d121acf93a233e Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Wed, 23 Jul 2014 00:30:55 +0200 Subject: [PATCH 2/2] [ticket/12883] Remove pointless comments PHPBB3-12883 --- phpBB/phpbb/cron/task/core/tidy_search.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/phpBB/phpbb/cron/task/core/tidy_search.php b/phpBB/phpbb/cron/task/core/tidy_search.php index 2665d18799..2c30274dfa 100644 --- a/phpBB/phpbb/cron/task/core/tidy_search.php +++ b/phpBB/phpbb/cron/task/core/tidy_search.php @@ -54,7 +54,6 @@ class tidy_search extends \phpbb\cron\task\base */ public function run() { - // Select the search method $search_type = $this->config['search_type']; // We do some additional checks in the module to ensure it can actually be utilised @@ -78,10 +77,7 @@ class tidy_search extends \phpbb\cron\task\base */ public function is_runnable() { - // Select the search method - $search_type = $this->config['search_type']; - - return class_exists($search_type); + return class_exists($this->config['search_type']); } /**