[ticket/11048] add access specifiers to phpbb native search

PHPBB3-11048
This commit is contained in:
Dhruv 2012-08-10 12:23:25 +05:30
parent de8b7c0b7d
commit dd56c401af

View file

@ -90,7 +90,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* *
* @access public * @access public
*/ */
function split_keywords($keywords, $terms) public function split_keywords($keywords, $terms)
{ {
$tokens = '+-|()*'; $tokens = '+-|()*';
@ -427,7 +427,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* *
* @access public * @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. // No keywords? No posts.
if (empty($this->search_query)) if (empty($this->search_query))
@ -823,7 +823,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* *
* @access public * @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. // No author? No posts.
if (!sizeof($author_ary)) if (!sizeof($author_ary))
@ -1048,7 +1048,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* *
* @access private * @access private
*/ */
function split_message($text) public function split_message($text)
{ {
$match = $words = array(); $match = $words = array();
@ -1125,7 +1125,7 @@ class phpbb_search_fulltext_native extends phpbb_search_base
* *
* @access public * @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']) 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 * 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)) 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 * Tidy up indexes: Tag 'common words' and remove
* words no longer referenced in the match table * words no longer referenced in the match table
*/ */
function tidy() public function tidy()
{ {
// Is the fulltext indexer disabled? If yes then we need not // 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 // 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 * 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) 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 * Returns true if both FULLTEXT indexes exist
*/ */
function index_created() public function index_created()
{ {
if (!sizeof($this->stats)) 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 * Returns an associative array containing information about the indexes
*/ */
function index_stats() public function index_stats()
{ {
if (!sizeof($this->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']); $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_words'] = $this->db->get_estimated_row_count(SEARCH_WORDLIST_TABLE);
$this->stats['total_matches'] = $this->db->get_estimated_row_count(SEARCH_WORDMATCH_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? * @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(); static $conv = array(), $conv_loaded = array();
$words = $allow = 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 * 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 * if we need any options, copied from fulltext_native for now, will have to be adjusted or removed