mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/15540] Display only available search backends
PHPBB3-15540
This commit is contained in:
@@ -116,6 +116,14 @@ class fulltext_mysql extends base implements search_backend_interface
|
||||
return 'MySQL Fulltext';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function is_available(): bool
|
||||
{
|
||||
return $this->db->get_sql_layer() == 'mysqli';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -147,7 +155,7 @@ class fulltext_mysql extends base implements search_backend_interface
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
if ($this->db->get_sql_layer() != 'mysqli')
|
||||
if (!$this->is_available())
|
||||
{
|
||||
return $this->user->lang['FULLTEXT_MYSQL_INCOMPATIBLE_DATABASE'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user