From 088fcf8131a0d5b612362c2fecf337df6ef754bb Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 20 Jun 2019 08:40:02 +0300 Subject: move more globals to more appropriate places set libxml to always use internal errors --- include/sanity_check.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'include/sanity_check.php') diff --git a/include/sanity_check.php b/include/sanity_check.php index f06cf0a39..b1b4571b2 100755 --- a/include/sanity_check.php +++ b/include/sanity_check.php @@ -27,7 +27,23 @@ return $url_path; } - /** + function check_mysql_tables() { + $pdo = Db::pdo(); + + $sth = $pdo->prepare("SELECT engine, table_name FROM information_schema.tables WHERE + table_schema = ? AND table_name LIKE 'ttrss_%' AND engine != 'InnoDB'"); + $sth->execute([DB_NAME]); + + $bad_tables = []; + + while ($line = $sth->fetch()) { + array_push($bad_tables, $line); + } + + return $bad_tables; + } + +/** * @SuppressWarnings(PHPMD.UnusedLocalVariable) */ function initial_sanity_check() { -- cgit v1.2.3