diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-10-13 12:29:34 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-10-13 12:29:34 +0200 |
commit | 8c2d0c8c3639bbfc2799d372cc7aafcb62fc4b8a (patch) | |
tree | 14dfe3014300268e2f775f86075fd89d5552a004 /phpBB/phpbb/search | |
parent | 6f48b3c044a5339bc019f355db490e1a53b51fdc (diff) | |
parent | e8b4304c1bbe35784b4cac5dd4059d6a4ac2dcac (diff) | |
download | forums-8c2d0c8c3639bbfc2799d372cc7aafcb62fc4b8a.tar forums-8c2d0c8c3639bbfc2799d372cc7aafcb62fc4b8a.tar.gz forums-8c2d0c8c3639bbfc2799d372cc7aafcb62fc4b8a.tar.bz2 forums-8c2d0c8c3639bbfc2799d372cc7aafcb62fc4b8a.tar.xz forums-8c2d0c8c3639bbfc2799d372cc7aafcb62fc4b8a.zip |
Merge pull request #5708 from marc1706/ticket/16051
[ticket/16051] Remove mysql driver as it's no longer supported in PHP >= 7.0
Diffstat (limited to 'phpBB/phpbb/search')
-rw-r--r-- | phpBB/phpbb/search/fulltext_mysql.php | 21 | ||||
-rw-r--r-- | phpBB/phpbb/search/fulltext_native.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/search/fulltext_sphinx.php | 4 |
3 files changed, 5 insertions, 22 deletions
diff --git a/phpBB/phpbb/search/fulltext_mysql.php b/phpBB/phpbb/search/fulltext_mysql.php index 4d3e13663d..8bdc31e128 100644 --- a/phpBB/phpbb/search/fulltext_mysql.php +++ b/phpBB/phpbb/search/fulltext_mysql.php @@ -154,7 +154,7 @@ class fulltext_mysql extends \phpbb\search\base */ public function init() { - if ($this->db->get_sql_layer() != 'mysql4' && $this->db->get_sql_layer() != 'mysqli') + if ($this->db->get_sql_layer() != 'mysqli') { return $this->user->lang['FULLTEXT_MYSQL_INCOMPATIBLE_DATABASE']; } @@ -1005,14 +1005,7 @@ class fulltext_mysql extends \phpbb\search\base if (!isset($this->stats['post_subject'])) { $alter_entry = array(); - if ($this->db->get_sql_layer() == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>=')) - { - $alter_entry[] = 'MODIFY post_subject varchar(255) COLLATE utf8_unicode_ci DEFAULT \'\' NOT NULL'; - } - else - { - $alter_entry[] = 'MODIFY post_subject text NOT NULL'; - } + $alter_entry[] = 'MODIFY post_subject varchar(255) COLLATE utf8_unicode_ci DEFAULT \'\' NOT NULL'; $alter_entry[] = 'ADD FULLTEXT (post_subject)'; $alter_list[] = $alter_entry; } @@ -1020,15 +1013,7 @@ class fulltext_mysql extends \phpbb\search\base if (!isset($this->stats['post_content'])) { $alter_entry = array(); - if ($this->db->get_sql_layer() == 'mysqli' || version_compare($this->db->sql_server_info(true), '4.1.3', '>=')) - { - $alter_entry[] = 'MODIFY post_text mediumtext COLLATE utf8_unicode_ci NOT NULL'; - } - else - { - $alter_entry[] = 'MODIFY post_text mediumtext NOT NULL'; - } - + $alter_entry[] = 'MODIFY post_text mediumtext COLLATE utf8_unicode_ci NOT NULL'; $alter_entry[] = 'ADD FULLTEXT post_content (post_text, post_subject)'; $alter_list[] = $alter_entry; } diff --git a/phpBB/phpbb/search/fulltext_native.php b/phpBB/phpbb/search/fulltext_native.php index ecebbd37cd..295c2cf33c 100644 --- a/phpBB/phpbb/search/fulltext_native.php +++ b/phpBB/phpbb/search/fulltext_native.php @@ -889,7 +889,6 @@ class fulltext_native extends \phpbb\search\base switch ($this->db->get_sql_layer()) { - case 'mysql4': case 'mysqli': // 3.x does not support SQL_CALC_FOUND_ROWS @@ -1184,7 +1183,6 @@ class fulltext_native extends \phpbb\search\base { switch ($this->db->get_sql_layer()) { - case 'mysql4': case 'mysqli': // $select = 'SQL_CALC_FOUND_ROWS ' . $select; $is_mysql = true; diff --git a/phpBB/phpbb/search/fulltext_sphinx.php b/phpBB/phpbb/search/fulltext_sphinx.php index d8331d3815..6230f92da3 100644 --- a/phpBB/phpbb/search/fulltext_sphinx.php +++ b/phpBB/phpbb/search/fulltext_sphinx.php @@ -214,7 +214,7 @@ class fulltext_sphinx */ public function init() { - if ($this->db->get_sql_layer() != 'mysql' && $this->db->get_sql_layer() != 'mysql4' && $this->db->get_sql_layer() != 'mysqli' && $this->db->get_sql_layer() != 'postgres') + if ($this->db->get_sql_layer() != 'mysqli' && $this->db->get_sql_layer() != 'postgres') { return $this->user->lang['FULLTEXT_SPHINX_WRONG_DATABASE']; } @@ -233,7 +233,7 @@ class fulltext_sphinx protected function config_generate() { // Check if Database is supported by Sphinx - if ($this->db->get_sql_layer() =='mysql' || $this->db->get_sql_layer() == 'mysql4' || $this->db->get_sql_layer() == 'mysqli') + if ($this->db->get_sql_layer() == 'mysqli') { $this->dbtype = 'mysql'; } |