diff options
author | Andrew Dolgov <[email protected]> | 2019-06-20 08:40:02 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-06-20 08:40:02 +0300 |
commit | 088fcf8131a0d5b612362c2fecf337df6ef754bb (patch) | |
tree | 3e5e415be8e411bb6a8eeac2e5a62e926f103c72 /include/sanity_check.php | |
parent | 4fa9aee4e7d187ed0f87d0dc9b88a86ba625c58f (diff) |
move more globals to more appropriate places
set libxml to always use internal errors
Diffstat (limited to 'include/sanity_check.php')
-rwxr-xr-x | include/sanity_check.php | 18 |
1 files changed, 17 insertions, 1 deletions
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() { |