diff options
author | Vishal Pandey <vishpandey2014@gmail.com> | 2017-01-15 15:10:35 +0300 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2017-03-20 19:55:21 +0300 |
commit | 5da44ce1a642e611068276fdcc1eef236e88a9a6 (patch) | |
tree | 4c385c1b491b956ca7c272de4979ae74f3585314 /tbl_structure.php | |
parent | 2c48b61757472ca4f0b90f8f0144a86877a44a35 (diff) |
Move the tbl_info.inc.php code to Table class
Fixes #12567
Signed-off-by: flash1452 <vishpandey2014@gmail.com>
Diffstat (limited to 'tbl_structure.php')
-rw-r--r-- | tbl_structure.php | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/tbl_structure.php b/tbl_structure.php index f2170ee459..0e313884e9 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -10,10 +10,10 @@ namespace PMA; use PMA\libraries\controllers\table\TableStructureController; +use PMA\libraries\controllers\Table; use PMA\libraries\Response; require_once 'libraries/common.inc.php'; -require_once 'libraries/tbl_info.inc.php'; require_once 'libraries/config/messages.inc.php'; require_once 'libraries/config/user_preferences.forms.php'; require_once 'libraries/config/page_settings.forms.php'; @@ -29,6 +29,22 @@ $container->alias('response', 'PMA\libraries\Response'); global $db, $table, $db_is_system_schema, $tbl_is_view, $tbl_storage_engine, $table_info_num_rows, $tbl_collation, $showtable; +$GLOBALS['dbi']->selectDb($GLOBALS['db']); +$table_class_object = $GLOBALS['dbi']->getTable( + $GLOBALS['db'], + $GLOBALS['table'] +); +$reread_info = $table_class_object->getStatusInfo(null, true); +$GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ? true : false)); +if ($table_class_object->isView()) { + $tbl_is_view = true; + $tbl_storage_engine = __('View'); +} else { + $tbl_is_view = false; + $tbl_storage_engine = $table_class_object->getTableStorageEngine(); +} +$tbl_collation = $table_class_object->getTableCollation(); +$table_info_num_rows = $table_class_object->getTableNumRowInfo(); /* Define dependencies for the concerned controller */ $dependency_definitions = array( 'db' => $db, @@ -39,7 +55,7 @@ $dependency_definitions = array( 'tbl_storage_engine' => $tbl_storage_engine, 'table_info_num_rows' => $table_info_num_rows, 'tbl_collation' => $tbl_collation, - 'showtable' => $showtable + 'showtable' => $GLOBALS['showtable'] ); /** @var TableStructureController $controller */ |