diff options
author | Dhruv <dhruv.goel92@gmail.com> | 2012-08-15 14:13:31 +0530 |
---|---|---|
committer | Dhruv <dhruv.goel92@gmail.com> | 2012-08-15 14:13:31 +0530 |
commit | 6f61169e41ed4115cc45db0b82d1acaecab0296d (patch) | |
tree | 9e6ec7ea84d05fd1524d39f0c98bf67590650ec1 /phpBB/includes | |
parent | 64ff06cf872cef6c41b230967ac054eae7d005b9 (diff) | |
download | forums-6f61169e41ed4115cc45db0b82d1acaecab0296d.tar forums-6f61169e41ed4115cc45db0b82d1acaecab0296d.tar.gz forums-6f61169e41ed4115cc45db0b82d1acaecab0296d.tar.bz2 forums-6f61169e41ed4115cc45db0b82d1acaecab0296d.tar.xz forums-6f61169e41ed4115cc45db0b82d1acaecab0296d.zip |
[ticket/11051] add public functions for public properties
public retrieval functions for all public properties and change the
properties to protected in all search backends.
PHPBB3-11051
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/search/fulltext_mysql.php | 36 | ||||
-rw-r--r-- | phpBB/includes/search/fulltext_native.php | 36 | ||||
-rw-r--r-- | phpBB/includes/search/fulltext_postgres.php | 36 | ||||
-rw-r--r-- | phpBB/includes/search/fulltext_sphinx.php | 26 |
4 files changed, 122 insertions, 12 deletions
diff --git a/phpBB/includes/search/fulltext_mysql.php b/phpBB/includes/search/fulltext_mysql.php index cf89ab1c24..7cd06dee19 100644 --- a/phpBB/includes/search/fulltext_mysql.php +++ b/phpBB/includes/search/fulltext_mysql.php @@ -27,9 +27,9 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base protected $config; protected $db; protected $user; - public $word_length = array(); - public $search_query; - public $common_words = array(); + protected $word_length = array(); + protected $search_query; + protected $common_words = array(); /** * Constructor @@ -59,6 +59,36 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base } /** + * Returns the search_query + * + * @return string search query + */ + public function get_search_query() + { + return $this->search_query; + } + + /** + * Returns the common_words array + * + * @return array common words that are ignored by search backend + */ + public function get_common_words() + { + return $this->common_words; + } + + /** + * Returns the word_length array + * + * @return array min and max word length for searching + */ + public function get_word_length() + { + return $this->word_length; + } + + /** * Checks for correct MySQL version and stores min/max word length in the config * * @return string|bool Language key of the error/incompatiblity occured diff --git a/phpBB/includes/search/fulltext_native.php b/phpBB/includes/search/fulltext_native.php index 96b3f02ec6..1100484ebd 100644 --- a/phpBB/includes/search/fulltext_native.php +++ b/phpBB/includes/search/fulltext_native.php @@ -23,9 +23,9 @@ if (!defined('IN_PHPBB')) class phpbb_search_fulltext_native extends phpbb_search_base { protected $stats = array(); - public $word_length = array(); - public $search_query; - public $common_words = array(); + protected $word_length = array(); + protected $search_query; + protected $common_words = array(); protected $must_contain_ids = array(); protected $must_not_contain_ids = array(); @@ -74,6 +74,36 @@ class phpbb_search_fulltext_native extends phpbb_search_base } /** + * Returns the search_query + * + * @return string search query + */ + public function get_search_query() + { + return $this->search_query; + } + + /** + * Returns the common_words array + * + * @return array common words that are ignored by search backend + */ + public function get_common_words() + { + return $this->common_words; + } + + /** + * Returns the word_length array + * + * @return array min and max word length for searching + */ + public function get_word_length() + { + return $this->word_length; + } + + /** * This function fills $this->search_query with the cleaned user search query. * * If $terms is 'any' then the words will be extracted from the search query diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php index 50ed785093..38989a9d9a 100644 --- a/phpBB/includes/search/fulltext_postgres.php +++ b/phpBB/includes/search/fulltext_postgres.php @@ -31,9 +31,9 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base protected $config; protected $db; protected $user; - public $search_query; - public $common_words = array(); - public $word_length = array(); + protected $search_query; + protected $common_words = array(); + protected $word_length = array(); /** * Constructor @@ -73,6 +73,36 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base } /** + * Returns the search_query + * + * @return string search query + */ + public function get_search_query() + { + return $this->search_query; + } + + /** + * Returns the common_words array + * + * @return array common words that are ignored by search backend + */ + public function get_common_words() + { + return $this->common_words; + } + + /** + * Returns the word_length array + * + * @return array min and max word length for searching + */ + public function get_word_length() + { + return $this->word_length; + } + + /** * Returns if phrase search is supported or not * * @return bool diff --git a/phpBB/includes/search/fulltext_sphinx.php b/phpBB/includes/search/fulltext_sphinx.php index 1a3bbe23db..256c3a6d1c 100644 --- a/phpBB/includes/search/fulltext_sphinx.php +++ b/phpBB/includes/search/fulltext_sphinx.php @@ -42,8 +42,8 @@ class phpbb_search_fulltext_sphinx protected $dbtype; protected $user; protected $config_file_data = ''; - public $search_query; - public $common_words = array(); + protected $search_query; + protected $common_words = array(); /** * Constructor @@ -87,7 +87,7 @@ class phpbb_search_fulltext_sphinx $error = false; } - + /** * Returns the name of this search backend to be displayed to administrators * @@ -99,6 +99,26 @@ class phpbb_search_fulltext_sphinx } /** + * Returns the search_query + * + * @return string search query + */ + public function get_search_query() + { + return $this->search_query; + } + + /** + * Returns the common_words array + * + * @return array common words that are ignored by search backend + */ + public function get_common_words() + { + return $this->common_words; + } + + /** * Checks permissions and paths, if everything is correct it generates the config file * * @return string|bool Language key of the error/incompatiblity encountered, or false if successful |