From db9351d0f6f1baa2184cfef284317b62f5ba52a6 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 10 Aug 2012 16:07:24 +0530 Subject: [ticket/11050] add access specifiers to mysql search properties PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 43 +++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 7cd06dee19..a1c9101bc1 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -22,14 +22,51 @@ if (!defined('IN_PHPBB')) */ class phpbb_search_fulltext_mysql extends phpbb_search_base { + /** + * Associative array holding index stats + * @var array + */ protected $stats = array(); + + /** + * Holds the words entered by user splitted in array + * @var array + */ protected $split_words = array(); + + /** + * @var phpbb_config Config class object + */ protected $config; + + /** + * @var dbal DBAL class object + */ protected $db; + + /** + * @var user User class object + */ protected $user; - protected $word_length = array(); - protected $search_query; - protected $common_words = array(); + + /** + * Associative array stores the min and max length + * @var array + */ + public $word_length = array(); + + /** + * Contains tidied search query + * @var string + */ + public $search_query; + + /** + * Contains common words + * common words are words with length less/more than min/max length + * @var array + */ + public $common_words = array(); /** * Constructor -- cgit v1.2.1 From 3dc42c67d3d0870e47ecf98abfa885262bcf962d Mon Sep 17 00:00:00 2001 From: Dhruv Date: Tue, 14 Aug 2012 23:54:46 +0530 Subject: [ticket/11050] fix docblocks with description before @var PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index a1c9101bc1..98df301082 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -35,17 +35,20 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base protected $split_words = array(); /** - * @var phpbb_config Config class object + * Config class object + * @var phpbb_config */ protected $config; /** - * @var dbal DBAL class object + * DBAL class object + * @var dbal */ protected $db; /** - * @var user User class object + * User class object + * @var user */ protected $user; -- cgit v1.2.1 From 56395ea3597ee7a487444ebd6e6d6c237a5a328a Mon Sep 17 00:00:00 2001 From: Dhruv Date: Wed, 15 Aug 2012 23:49:51 +0530 Subject: [ticket/11050] fix minor comment/docblocks issues No comments should end with a period. All occurences like PostgreSQL should have proper case. PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 98df301082..c84a608763 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -73,7 +73,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base /** * Constructor - * Creates a new phpbb_search_fulltext_mysql, which is used as a search backend. + * Creates a new phpbb_search_fulltext_mysql, which is used as a search backend * * @param string|bool $error Any error that occurs is passed on through this reference variable otherwise false */ @@ -325,7 +325,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base } /** - * Performs a search on keywords depending on display specific params. You have to run split_keywords() first. + * Performs a search on keywords depending on display specific params. You have to run split_keywords() first * * @param string $type contains either posts or topics depending on what should be searched for * @param string $fields contains either titleonly (topic titles should be searched), msgonly (only message bodies should be searched), firstpost (only subject and body of the first post should be searched) or all (all post bodies and subjects should be searched) @@ -346,7 +346,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base */ public function keyword_search($type, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page) { - // No keywords? No posts. + // No keywords? No posts if (!$this->search_query) { return false; @@ -526,7 +526,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base */ public function author_search($type, $firstpost_only, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_fid_ary, $m_approve_fid_ary, $topic_id, $author_ary, $author_name, &$id_ary, $start, $per_page) { - // No author? No posts. + // No author? No posts if (!sizeof($author_ary)) { return 0; @@ -675,7 +675,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base } /** - * Destroys cached search results, that contained one of the new words in a post so the results won't be outdated. + * Destroys cached search results, that contained one of the new words in a post so the results won't be outdated * * @param string $mode contains the post mode: edit, post, reply, quote ... * @param int $post_id contains the post id of the post to index -- cgit v1.2.1 From 8eed3591a9019cf8a377b7690130c1d466aa3ea2 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Thu, 16 Aug 2012 00:07:11 +0530 Subject: [ticket/11050] replace user by phpbb_user PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index c84a608763..25d9d47dc6 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -48,7 +48,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base /** * User class object - * @var user + * @var phpbb_user */ protected $user; -- cgit v1.2.1 From b7dae379d53a81a1197e703aced19a6206985054 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 19 Aug 2012 12:07:06 +0530 Subject: [ticket/11050] remove class word from docblocks PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 25d9d47dc6..608392fc15 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -35,19 +35,19 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base protected $split_words = array(); /** - * Config class object + * Config object * @var phpbb_config */ protected $config; /** - * DBAL class object + * DBAL object * @var dbal */ protected $db; /** - * User class object + * User object * @var phpbb_user */ protected $user; -- cgit v1.2.1 From 6ae64f1c1e37ff2b4de488d6f5264e581b0ac6cf Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 19 Aug 2012 13:04:34 +0530 Subject: [ticket/11050] fix split words doc block language PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 608392fc15..3edf732b74 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -29,7 +29,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base protected $stats = array(); /** - * Holds the words entered by user splitted in array + * Holds the words entered by user, obtained by splitting the entered query on whitespace * @var array */ protected $split_words = array(); -- cgit v1.2.1 From 7c3cbc07cf708865a8ab45547e5a8e70bb82196d Mon Sep 17 00:00:00 2001 From: Dhruv Date: Sun, 19 Aug 2012 13:13:03 +0530 Subject: [ticket/11050] multi sentences separated by period in docblocks Starting of each sentence should be capitalized. PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 3edf732b74..2b136f3f79 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -65,8 +65,8 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base public $search_query; /** - * Contains common words - * common words are words with length less/more than min/max length + * Contains common words. + * Common words are words with length less/more than min/max length * @var array */ public $common_words = array(); -- cgit v1.2.1 From 0556959a6af3868fe17093840a46340105483759 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Mon, 20 Aug 2012 00:58:41 +0530 Subject: [ticket/11050] fix min/max length docblock language PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 2b136f3f79..0cd0f99695 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -53,7 +53,7 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base protected $user; /** - * Associative array stores the min and max length + * Associative array stores the min and max word length to be searched * @var array */ public $word_length = array(); -- cgit v1.2.1 From 72245e41d0df20ec30967d12836170a07bf5b427 Mon Sep 17 00:00:00 2001 From: Dhruv Date: Mon, 20 Aug 2012 01:04:43 +0530 Subject: [ticket/11050] fix tidied search query docblock language PHPBB3-11050 --- phpBB/includes/search/fulltext_mysql.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 0cd0f99695..2084864e4d 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -59,7 +59,8 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base public $word_length = array(); /** - * Contains tidied search query + * Contains tidied search query. + * Operators are prefixed in search query and common words excluded * @var string */ public $search_query; -- cgit v1.2.1 From a509a8ed2d921d4797e08531e70ba70afb167d9d Mon Sep 17 00:00:00 2001 From: Dhruv Date: Fri, 9 Nov 2012 16:22:32 +0530 Subject: [ticket/11050] make all properties protected in all search backends PHPBB-11050 --- phpBB/includes/search/fulltext_mysql.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 2084864e4d..700b8695dc 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -56,21 +56,21 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base * Associative array stores the min and max word length to be searched * @var array */ - public $word_length = array(); + protected $word_length = array(); /** * Contains tidied search query. * Operators are prefixed in search query and common words excluded * @var string */ - public $search_query; + protected $search_query; /** * Contains common words. * Common words are words with length less/more than min/max length * @var array */ - public $common_words = array(); + protected $common_words = array(); /** * Constructor -- cgit v1.2.1 From f5b3adb29653ed215de182962917501a1e36a020 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sat, 10 Nov 2012 00:30:46 +0100 Subject: [ticket/10780] Use L_COLON on search backend ACP pages. PHPBB3-10780 --- phpBB/includes/search/fulltext_mysql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/includes/search/fulltext_mysql.php') diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index 700b8695dc..58a4dd7d6a 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -905,11 +905,11 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base { $tpl = '
-

' . $this->user->lang['FULLTEXT_MYSQL_MIN_SEARCH_CHARS_EXPLAIN'] . '
+

' . $this->user->lang['FULLTEXT_MYSQL_MIN_SEARCH_CHARS_EXPLAIN'] . '
' . $this->config['fulltext_mysql_min_word_len'] . '
-

' . $this->user->lang['FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN'] . '
+

' . $this->user->lang['FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN'] . '
' . $this->config['fulltext_mysql_max_word_len'] . '
'; -- cgit v1.2.1