1
0
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:
rubencm
2021-03-22 17:51:51 +01:00
parent 911a31d898
commit 457c750773
6 changed files with 74 additions and 36 deletions

View File

@@ -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'];
}