From dd56c401af495655fe729e3d5919623114812f1a Mon Sep 17 00:00:00 2001 From: Dhruv <dhruv.goel92@gmail.com> Date: Fri, 10 Aug 2012 12:23:25 +0530 Subject: [PATCH] [ticket/11048] add access specifiers to phpbb native search PHPBB3-11048 --- phpBB/includes/search/fulltext_native.php | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index ea9d050b60..478b1f2c82 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -90,7 +90,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base * * @access public */ - function split_keywords($keywords, $terms) + public function split_keywords($keywords, $terms) { $tokens = '+-|()*'; @@ -427,7 +427,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base * * @access 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) + 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. if (empty($this->search_query)) @@ -823,7 +823,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base * * @access 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) + 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. if (!sizeof($author_ary)) @@ -1048,7 +1048,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base * * @access private */ - function split_message($text) + public function split_message($text) { $match = $words = array(); @@ -1125,7 +1125,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base * * @access public */ - function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id) + public function index($mode, $post_id, &$message, &$subject, $poster_id, $forum_id) { if (!$this->config['fulltext_native_load_upd']) { @@ -1282,7 +1282,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base /** * Removes entries from the wordmatch table for the specified post_ids */ - function index_remove($post_ids, $author_ids, $forum_ids) + public function index_remove($post_ids, $author_ids, $forum_ids) { if (sizeof($post_ids)) { @@ -1340,7 +1340,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base * Tidy up indexes: Tag 'common words' and remove * words no longer referenced in the match table */ - function tidy() + public function tidy() { // Is the fulltext indexer disabled? If yes then we need not // carry on ... it's okay ... I know when I'm not wanted boo hoo @@ -1403,7 +1403,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base /** * Deletes all words from the index */ - function delete_index($acp_module, $u_action) + public function delete_index($acp_module, $u_action) { switch ($this->db->sql_layer) { @@ -1425,7 +1425,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base /** * Returns true if both FULLTEXT indexes exist */ - function index_created() + public function index_created() { if (!sizeof($this->stats)) { @@ -1438,7 +1438,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base /** * Returns an associative array containing information about the indexes */ - function index_stats() + public function index_stats() { if (!sizeof($this->stats)) { @@ -1450,7 +1450,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base $this->user->lang['TOTAL_MATCHES'] => $this->stats['total_matches']); } - function get_stats() + private function get_stats() { $this->stats['total_words'] = $this->db->get_estimated_row_count(SEARCH_WORDLIST_TABLE); $this->stats['total_matches'] = $this->db->get_estimated_row_count(SEARCH_WORDMATCH_TABLE); @@ -1471,7 +1471,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base * * @todo normalizer::cleanup being able to be used? */ - function cleanup($text, $allowed_chars = null, $encoding = 'utf-8') + private function cleanup($text, $allowed_chars = null, $encoding = 'utf-8') { static $conv = array(), $conv_loaded = array(); $words = $allow = array(); @@ -1700,7 +1700,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base /** * Returns a list of options for the ACP to display */ - function acp() + public function acp() { /** * if we need any options, copied from fulltext_native for now, will have to be adjusted or removed