From 7f58a4572eaca75aecff2da889e67ea151616011 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 28 Oct 2013 22:27:25 +0100 Subject: [ticket/11981] Fix code sniffer complaints PHPBB3-11981 --- phpBB/phpbb/search/fulltext_native.php | 1 - 1 file changed, 1 deletion(-) (limited to 'phpBB/phpbb/search') diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index 33326f2882..024b8f441b 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -850,7 +850,6 @@ class fulltext_native extends \phpbb\search\base } $this->db->sql_freeresult($result); - // if we use mysql and the total result count is not cached yet, retrieve it from the db if (!$total_results && $is_mysql) { -- cgit v1.2.1 From 7aa8f6461f1e85cf91931f56b95384e54fec07c2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 30 Oct 2013 13:05:28 +0100 Subject: [task/code-sniffer] Remove the IN_PHPBB check side-effect from class files. PHPBB3-11980 --- phpBB/phpbb/search/base.php | 8 -------- phpBB/phpbb/search/fulltext_mysql.php | 8 -------- phpBB/phpbb/search/fulltext_native.php | 8 -------- phpBB/phpbb/search/fulltext_postgres.php | 8 -------- phpBB/phpbb/search/fulltext_sphinx.php | 10 ---------- phpBB/phpbb/search/sphinx/config.php | 8 -------- phpBB/phpbb/search/sphinx/config_comment.php | 8 -------- phpBB/phpbb/search/sphinx/config_section.php | 8 -------- phpBB/phpbb/search/sphinx/config_variable.php | 8 -------- 9 files changed, 74 deletions(-) (limited to 'phpBB/phpbb/search') diff --git a/phpBB/phpbb/search/base.php b/phpBB/phpbb/search/base.php index f2f982c31b..9ecf3751d0 100644 --- a/phpBB/phpbb/search/base.php +++ b/phpBB/phpbb/search/base.php @@ -9,14 +9,6 @@ namespace phpbb\search; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * @ignore */ diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php index ca2f42358f..cdd2da222f 100644 --- a/phpBB/phpbb/search/fulltext_mysql.php +++ b/phpBB/phpbb/search/fulltext_mysql.php @@ -9,14 +9,6 @@ namespace phpbb\search; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * fulltext_mysql * Fulltext search for MySQL diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index 024b8f441b..f3bb94a0c5 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -9,14 +9,6 @@ namespace phpbb\search; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * fulltext_native * phpBB's own db driven fulltext search, version 2 diff --git a/phpBB/phpbb/search/fulltext_postgres.php b/phpBB/phpbb/search/fulltext_postgres.php index 756034103e..063bf52a19 100644 --- a/phpBB/phpbb/search/fulltext_postgres.php +++ b/phpBB/phpbb/search/fulltext_postgres.php @@ -9,14 +9,6 @@ namespace phpbb\search; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * fulltext_postgres * Fulltext search for PostgreSQL diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index cb76d58f49..acbfad9474 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -9,16 +9,6 @@ namespace phpbb\search; -/** -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - -/** -* @ignore -*/ define('SPHINX_MAX_MATCHES', 20000); define('SPHINX_CONNECT_RETRIES', 3); define('SPHINX_CONNECT_WAIT_TIME', 300); diff --git a/phpBB/phpbb/search/sphinx/config.php b/phpBB/phpbb/search/sphinx/config.php index 262d6008cc..cb8e4524df 100644 --- a/phpBB/phpbb/search/sphinx/config.php +++ b/phpBB/phpbb/search/sphinx/config.php @@ -9,14 +9,6 @@ namespace phpbb\search\sphinx; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * \phpbb\search\sphinx\config * An object representing the sphinx configuration diff --git a/phpBB/phpbb/search/sphinx/config_comment.php b/phpBB/phpbb/search/sphinx/config_comment.php index 77a943377d..20b1c19af1 100644 --- a/phpBB/phpbb/search/sphinx/config_comment.php +++ b/phpBB/phpbb/search/sphinx/config_comment.php @@ -9,14 +9,6 @@ namespace phpbb\search\sphinx; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * \phpbb\search\sphinx\config_comment * Represents a comment inside the sphinx configuration diff --git a/phpBB/phpbb/search/sphinx/config_section.php b/phpBB/phpbb/search/sphinx/config_section.php index 730abf011e..8f9253ec56 100644 --- a/phpBB/phpbb/search/sphinx/config_section.php +++ b/phpBB/phpbb/search/sphinx/config_section.php @@ -9,14 +9,6 @@ namespace phpbb\search\sphinx; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * \phpbb\search\sphinx\config_section * Represents a single section inside the sphinx configuration diff --git a/phpBB/phpbb/search/sphinx/config_variable.php b/phpBB/phpbb/search/sphinx/config_variable.php index c8f40bfb5f..c0f6d28dcc 100644 --- a/phpBB/phpbb/search/sphinx/config_variable.php +++ b/phpBB/phpbb/search/sphinx/config_variable.php @@ -9,14 +9,6 @@ namespace phpbb\search\sphinx; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - /** * \phpbb\search\sphinx\config_variable * Represents a single variable inside the sphinx configuration -- cgit v1.2.1 From ef1f99183796f8e246f96bca54ca439bf8ea1750 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 30 Oct 2013 13:37:29 +0100 Subject: [task/code-sniffer] Replace spaces with tabs. PHPBB3-11980 --- phpBB/phpbb/search/fulltext_native.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/phpbb/search') diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index f3bb94a0c5..1b314a24d3 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -1180,8 +1180,8 @@ class fulltext_native extends \phpbb\search\base * we know that it will also be lower than CJK ranges */ if ((strncmp($word, UTF8_HANGUL_FIRST, 3) < 0 || strncmp($word, UTF8_HANGUL_LAST, 3) > 0) - && (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0) - && (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0)) + && (strncmp($word, UTF8_CJK_FIRST, 3) < 0 || strncmp($word, UTF8_CJK_LAST, 3) > 0) + && (strncmp($word, UTF8_CJK_B_FIRST, 4) < 0 || strncmp($word, UTF8_CJK_B_LAST, 4) > 0)) { $word = strtok(' '); continue; @@ -1675,8 +1675,8 @@ class fulltext_native extends \phpbb\search\base $pos += $utf_len; if (($utf_char >= UTF8_HANGUL_FIRST && $utf_char <= UTF8_HANGUL_LAST) - || ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST) - || ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST)) + || ($utf_char >= UTF8_CJK_FIRST && $utf_char <= UTF8_CJK_LAST) + || ($utf_char >= UTF8_CJK_B_FIRST && $utf_char <= UTF8_CJK_B_LAST)) { /** * All characters within these ranges are valid -- cgit v1.2.1