remove mysql 5.5 support

This commit is contained in:
Zankaria 2024-11-28 01:06:59 +01:00
parent 5bd89a9437
commit 73bc23a4c7
5 changed files with 2 additions and 50 deletions

View file

@ -52,11 +52,7 @@ if (file_exists($config['has_installed'])) {
function __query($sql) {
sql_open();
if (mysql_version() >= 50503)
return query($sql);
else
return query(str_replace('utf8mb4', 'utf8', $sql));
return query($sql);
}
$boards = listBoards();
@ -939,7 +935,6 @@ if ($step == 0) {
$sql = @file_get_contents('install.sql') or error("Couldn't load install.sql.");
sql_open();
$mysql_version = mysql_version();
// This code is probably horrible, but what I'm trying
// to do is find all of the SQL queires and put them
@ -952,8 +947,6 @@ if ($step == 0) {
$sql_errors = '';
$sql_err_count = 0;
foreach ($queries as $query) {
if ($mysql_version < 50503)
$query = preg_replace('/(CHARSET=|CHARACTER SET )utf8mb4/', '$1utf8', $query);
$query = preg_replace('/^([\w\s]*)`([0-9a-zA-Z$_\x{0080}-\x{FFFF}]+)`/u', '$1``$2``', $query);
if (!query($query)) {
$sql_err_count++;