From d6ebe7a46f7bcb2092f839b287a998f7f6aa4db8 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Sat, 12 Feb 2022 23:58:17 +0100 Subject: [PATCH] Fix missing utf8mb4-check. --- include/db/db.inc.php | 7 +++++++ lib/Serendipity/Database/MysqliDatabase.php | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/db/db.inc.php b/include/db/db.inc.php index 14eed78f..a97f2884 100644 --- a/include/db/db.inc.php +++ b/include/db/db.inc.php @@ -165,3 +165,10 @@ function serendipity_db_probe($hash, &$errs) $db = DbFactory::createFromConfig($serendipity); return $db->probe($hash, $errs); } + +function serendipity_utf8mb4_reader() +{ + global $serendipity; + $db = DbFactory::createFromConfig($serendipity); + return $db->isUtf8mb4Ready(); +} diff --git a/lib/Serendipity/Database/MysqliDatabase.php b/lib/Serendipity/Database/MysqliDatabase.php index e7a55eea..8bc6049f 100644 --- a/lib/Serendipity/Database/MysqliDatabase.php +++ b/lib/Serendipity/Database/MysqliDatabase.php @@ -331,8 +331,8 @@ class MysqliDatabase extends DbAbstract * innodb being available with fulltext index and large index support, so that our database scheme can work * * @return boolean Whether the database could support utf8mb4 - */ - protected function isUtf8mb4Ready() + */ + public function isUtf8mb4Ready() { $mysql_version = mysqli_get_server_info($this->db_conn); $maria = false;