mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 23:37:39 +02:00
[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
This commit is contained in:
@@ -27,9 +27,9 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
|||||||
protected $config;
|
protected $config;
|
||||||
protected $db;
|
protected $db;
|
||||||
protected $user;
|
protected $user;
|
||||||
public $word_length = array();
|
protected $word_length = array();
|
||||||
public $search_query;
|
protected $search_query;
|
||||||
public $common_words = array();
|
protected $common_words = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -58,6 +58,36 @@ class phpbb_search_fulltext_mysql extends phpbb_search_base
|
|||||||
return 'MySQL Fulltext';
|
return 'MySQL Fulltext';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Checks for correct MySQL version and stores min/max word length in the config
|
||||||
*
|
*
|
||||||
|
@@ -23,9 +23,9 @@ if (!defined('IN_PHPBB'))
|
|||||||
class phpbb_search_fulltext_native extends phpbb_search_base
|
class phpbb_search_fulltext_native extends phpbb_search_base
|
||||||
{
|
{
|
||||||
protected $stats = array();
|
protected $stats = array();
|
||||||
public $word_length = array();
|
protected $word_length = array();
|
||||||
public $search_query;
|
protected $search_query;
|
||||||
public $common_words = array();
|
protected $common_words = array();
|
||||||
|
|
||||||
protected $must_contain_ids = array();
|
protected $must_contain_ids = array();
|
||||||
protected $must_not_contain_ids = array();
|
protected $must_not_contain_ids = array();
|
||||||
@@ -73,6 +73,36 @@ class phpbb_search_fulltext_native extends phpbb_search_base
|
|||||||
return 'phpBB Native Fulltext';
|
return 'phpBB Native Fulltext';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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.
|
* This function fills $this->search_query with the cleaned user search query.
|
||||||
*
|
*
|
||||||
|
@@ -31,9 +31,9 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||||||
protected $config;
|
protected $config;
|
||||||
protected $db;
|
protected $db;
|
||||||
protected $user;
|
protected $user;
|
||||||
public $search_query;
|
protected $search_query;
|
||||||
public $common_words = array();
|
protected $common_words = array();
|
||||||
public $word_length = array();
|
protected $word_length = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -72,6 +72,36 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
|
|||||||
return 'PostgreSQL Fulltext';
|
return 'PostgreSQL Fulltext';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Returns if phrase search is supported or not
|
||||||
*
|
*
|
||||||
|
@@ -42,8 +42,8 @@ class phpbb_search_fulltext_sphinx
|
|||||||
protected $dbtype;
|
protected $dbtype;
|
||||||
protected $user;
|
protected $user;
|
||||||
protected $config_file_data = '';
|
protected $config_file_data = '';
|
||||||
public $search_query;
|
protected $search_query;
|
||||||
public $common_words = array();
|
protected $common_words = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@@ -87,7 +87,7 @@ class phpbb_search_fulltext_sphinx
|
|||||||
|
|
||||||
$error = false;
|
$error = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the name of this search backend to be displayed to administrators
|
* Returns the name of this search backend to be displayed to administrators
|
||||||
*
|
*
|
||||||
@@ -98,6 +98,26 @@ class phpbb_search_fulltext_sphinx
|
|||||||
return 'Sphinx Fulltext';
|
return 'Sphinx Fulltext';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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
|
* Checks permissions and paths, if everything is correct it generates the config file
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user