From 8ecebf8940cdde217f4721ddda03fa819df67b77 Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Sun, 13 Feb 2022 00:10:19 +0100 Subject: [PATCH] Fix typo. Also added isUtf8mb4Ready() to DbAbstract. --- include/db/db.inc.php | 2 +- lib/Serendipity/Database/DbAbstract.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/include/db/db.inc.php b/include/db/db.inc.php index a97f2884..4ec65612 100644 --- a/include/db/db.inc.php +++ b/include/db/db.inc.php @@ -166,7 +166,7 @@ function serendipity_db_probe($hash, &$errs) return $db->probe($hash, $errs); } -function serendipity_utf8mb4_reader() +function serendipity_utf8mb4_ready() { global $serendipity; $db = DbFactory::createFromConfig($serendipity); diff --git a/lib/Serendipity/Database/DbAbstract.php b/lib/Serendipity/Database/DbAbstract.php index a76465c1..736cbf83 100644 --- a/lib/Serendipity/Database/DbAbstract.php +++ b/lib/Serendipity/Database/DbAbstract.php @@ -359,4 +359,16 @@ abstract class DbAbstract public function probe($hash, &$errs) { } + + /** + * Check if we think that it is safe to ugprade to utf8mb4. This checks version numbers and applied settings. + * Depending on the version of mariadb/mysql we need to check either one or three settings. We check for + * 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 + */ + public function isUtf8mb4Ready() + { + return false; + } }