diff options
| author | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-07-01 12:45:18 +0530 | 
|---|---|---|
| committer | Dhruv Goel <dhruv.goel92@gmail.com> | 2012-07-05 21:17:23 +0530 | 
| commit | 19d76f76dcd19e2bd44fbe7a384533bae4cb1538 (patch) | |
| tree | 5a66d0ed8eeea374a2642d04a707ef21566cf22e /phpBB/includes | |
| parent | f2dfaa73ffe96972f0d6b35aa65cf49b71d7513a (diff) | |
| download | forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.tar forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.tar.gz forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.tar.bz2 forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.tar.xz forums-19d76f76dcd19e2bd44fbe7a384533bae4cb1538.zip | |
[feature/postgresql-fulltext-search] remove phrase search code
Unused Code for phrase search removed as pgsql doesnt support it. An added
message is displayed if user tries to perform exact phrase search.
PHPBB3-9730
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/search/fulltext_postgres.php | 34 | 
1 files changed, 1 insertions, 33 deletions
| diff --git a/phpBB/includes/search/fulltext_postgres.php b/phpBB/includes/search/fulltext_postgres.php index aedc62ad7a..c38dc84d7b 100644 --- a/phpBB/includes/search/fulltext_postgres.php +++ b/phpBB/includes/search/fulltext_postgres.php @@ -30,6 +30,7 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base  	public $search_query;  	public $common_words = array();  	public $word_length = array(); +	public $phrase_search = false;  	public function __construct(&$error)  	{ @@ -110,39 +111,6 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base  		preg_match_all('#(?:[^\p{L}\p{N}*"()]|^)([+\-|]?(?:[\p{L}\p{N}*"()]+\'?)*[\p{L}\p{N}*"()])(?:[^\p{L}\p{N}*"()]|$)#u', $split_keywords, $matches);  		$this->split_words = $matches[1]; -		// to allow phrase search, we need to concatenate quoted words -		$tmp_split_words = array(); -		$phrase = ''; -		foreach ($this->split_words as $word) -		{ -			if ($phrase) -			{ -				$phrase .= ' ' . $word; -				if (strpos($word, '"') !== false && substr_count($word, '"') % 2 == 1) -				{ -					$tmp_split_words[] = $phrase; -					$phrase = ''; -				} -			} -			else if (strpos($word, '"') !== false && substr_count($word, '"') % 2 == 1) -			{ -				$phrase = $word; -			} -			else -			{ -				$tmp_split_words[] = $word . ' '; -			} -		} -		if ($phrase) -		{ -			$tmp_split_words[] = $phrase; -		} - -		$this->split_words = $tmp_split_words; - -		unset($tmp_split_words); -		unset($phrase); -  		foreach ($this->split_words as $i => $word)  		{  			$clean_word = preg_replace('#^[+\-|"]#', '', $word); | 
