From 319441274cbdcbdbfbba193cb447db00e2218cd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 6 Apr 2016 11:03:33 +0200 Subject: [PATCH] Share code for getting table status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This way it correctly respects DisableIS setting. Signed-off-by: Michal Čihař --- libraries/Util.php | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/libraries/Util.php b/libraries/Util.php index 4806972a4c..26120be4e2 100644 --- a/libraries/Util.php +++ b/libraries/Util.php @@ -4828,19 +4828,9 @@ class Util if ($db_info_result && $GLOBALS['dbi']->numRows($db_info_result) > 0) { while ($tmp = $GLOBALS['dbi']->fetchRow($db_info_result)) { if (! isset($sot_cache[$tmp[0]])) { - $sts_result = $GLOBALS['dbi']->query( - "SHOW TABLE STATUS FROM " . Util::backquote($db) - . " LIKE '" . Util::sqlAddSlashes($tmp[0], true) - . "';" - ); - $sts_tmp = $GLOBALS['dbi']->fetchAssoc($sts_result); - $GLOBALS['dbi']->freeResult($sts_result); - unset($sts_result); - - $tableArray = $GLOBALS['dbi']->copyTableProperties( - array($sts_tmp), $db - ); - $tables[$sts_tmp['Name']] = $tableArray[0]; + $tables[$tmp[0]] = $GLOBALS['dbi']->getTablesFull( + $db, $tmp[0] + )[$tmp[0]]; } else { // table in use $tables[$tmp[0]] = array( 'TABLE_NAME' => $tmp[0],