mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-14 12:40:13 +01:00
[ticket/12515] Remove check for PostgreSQL 8.3+
PHPBB3-12515
This commit is contained in:
parent
5dd19c726e
commit
e3e0c79b7a
@ -60,7 +60,6 @@ $lang = array_merge($lang, array(
|
|||||||
'FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching. You or your host can only change this setting by changing the mysql configuration.',
|
'FULLTEXT_MYSQL_MAX_SEARCH_CHARS_EXPLAIN' => 'Words with no more than this many characters will be indexed for searching. You or your host can only change this setting by changing the mysql configuration.',
|
||||||
|
|
||||||
'FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL.',
|
'FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL.',
|
||||||
'FULLTEXT_POSTGRES_TS_NOT_USABLE' => 'The PostgreSQL fulltext backend can only be used with PostgreSQL 8.3 and above.',
|
|
||||||
'FULLTEXT_POSTGRES_TOTAL_POSTS' => 'Total number of indexed posts',
|
'FULLTEXT_POSTGRES_TOTAL_POSTS' => 'Total number of indexed posts',
|
||||||
'FULLTEXT_POSTGRES_VERSION_CHECK' => 'PostgreSQL version',
|
'FULLTEXT_POSTGRES_VERSION_CHECK' => 'PostgreSQL version',
|
||||||
'FULLTEXT_POSTGRES_TS_NAME' => 'Text search Configuration Profile:',
|
'FULLTEXT_POSTGRES_TS_NAME' => 'Text search Configuration Profile:',
|
||||||
|
@ -30,18 +30,6 @@ class fulltext_postgres extends \phpbb\search\base
|
|||||||
*/
|
*/
|
||||||
protected $split_words = array();
|
protected $split_words = array();
|
||||||
|
|
||||||
/**
|
|
||||||
* True if PostgreSQL version supports tsearch
|
|
||||||
* @var boolean
|
|
||||||
*/
|
|
||||||
protected $tsearch_usable = false;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stores the PostgreSQL version
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
protected $version;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores the tsearch query
|
* Stores the tsearch query
|
||||||
* @var string
|
* @var string
|
||||||
@ -107,16 +95,6 @@ class fulltext_postgres extends \phpbb\search\base
|
|||||||
|
|
||||||
$this->word_length = array('min' => $this->config['fulltext_postgres_min_word_len'], 'max' => $this->config['fulltext_postgres_max_word_len']);
|
$this->word_length = array('min' => $this->config['fulltext_postgres_min_word_len'], 'max' => $this->config['fulltext_postgres_max_word_len']);
|
||||||
|
|
||||||
if ($this->db->get_sql_layer() == 'postgres')
|
|
||||||
{
|
|
||||||
$pgsql_version = explode(',', substr($this->db->sql_server_info(), 10));
|
|
||||||
$this->version = trim($pgsql_version[0]);
|
|
||||||
if (version_compare($this->version, '8.3', '>='))
|
|
||||||
{
|
|
||||||
$this->tsearch_usable = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load the UTF tools
|
* Load the UTF tools
|
||||||
*/
|
*/
|
||||||
@ -190,11 +168,6 @@ class fulltext_postgres extends \phpbb\search\base
|
|||||||
return $this->user->lang['FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE'];
|
return $this->user->lang['FULLTEXT_POSTGRES_INCOMPATIBLE_DATABASE'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$this->tsearch_usable)
|
|
||||||
{
|
|
||||||
return $this->user->lang['FULLTEXT_POSTGRES_TS_NOT_USABLE'];
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -913,13 +886,13 @@ class fulltext_postgres extends \phpbb\search\base
|
|||||||
$tpl = '
|
$tpl = '
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label>' . $this->user->lang['FULLTEXT_POSTGRES_VERSION_CHECK'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN'] . '</span></dt>
|
<dt><label>' . $this->user->lang['FULLTEXT_POSTGRES_VERSION_CHECK'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_VERSION_CHECK_EXPLAIN'] . '</span></dt>
|
||||||
<dd>' . (($this->tsearch_usable) ? $this->user->lang['YES'] : $this->user->lang['NO']) . ' (PostgreSQL ' . $this->version . ')</dd>
|
<dd>' . (($this->db->get_sql_layer() == 'postgres') ? $this->user->lang['YES'] : $this->user->lang['NO']) . '</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label>' . $this->user->lang['FULLTEXT_POSTGRES_TS_NAME'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_TS_NAME_EXPLAIN'] . '</span></dt>
|
<dt><label>' . $this->user->lang['FULLTEXT_POSTGRES_TS_NAME'] . '</label><br /><span>' . $this->user->lang['FULLTEXT_POSTGRES_TS_NAME_EXPLAIN'] . '</span></dt>
|
||||||
<dd><select name="config[fulltext_postgres_ts_name]">';
|
<dd><select name="config[fulltext_postgres_ts_name]">';
|
||||||
|
|
||||||
if ($this->db->get_sql_layer() == 'postgres' && $this->tsearch_usable)
|
if ($this->db->get_sql_layer() == 'postgres')
|
||||||
{
|
{
|
||||||
$sql = 'SELECT cfgname AS ts_name
|
$sql = 'SELECT cfgname AS ts_name
|
||||||
FROM pg_ts_config';
|
FROM pg_ts_config';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user