Translated using Weblate (Indonesian)
[phpmyadmin.git] / tbl_structure.php
bloba0c959fb3bbc7b6832bc8d8024f7d2fdded2f306
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Displays table structure infos like columns, indexes, size, rows
5 * and allows manipulation of indexes and columns
7 * @package PhpMyAdmin
8 */
10 use PhpMyAdmin\Controllers\Table\TableStructureController;
11 use PhpMyAdmin\Di\Container;
12 use PhpMyAdmin\Response;
14 require_once 'libraries/common.inc.php';
15 require_once 'libraries/config/messages.inc.php';
16 require_once 'libraries/config/user_preferences.forms.php';
17 require_once 'libraries/config/page_settings.forms.php';
19 $container = Container::getDefaultContainer();
20 $container->factory('PhpMyAdmin\Controllers\Table\TableStructureController');
21 $container->alias(
22 'TableStructureController',
23 'PhpMyAdmin\Controllers\Table\TableStructureController'
25 $container->set('PhpMyAdmin\Response', Response::getInstance());
26 $container->alias('response', 'PhpMyAdmin\Response');
28 global $db, $table, $db_is_system_schema, $tbl_is_view, $tbl_storage_engine,
29 $table_info_num_rows, $tbl_collation, $showtable;
30 $GLOBALS['dbi']->selectDb($GLOBALS['db']);
31 $table_class_object = $GLOBALS['dbi']->getTable(
32 $GLOBALS['db'],
33 $GLOBALS['table']
35 $reread_info = $table_class_object->getStatusInfo(null, true);
36 $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ? true : false));
37 if ($table_class_object->isView()) {
38 $tbl_is_view = true;
39 $tbl_storage_engine = __('View');
40 } else {
41 $tbl_is_view = false;
42 $tbl_storage_engine = $table_class_object->getStorageEngine();
44 $tbl_collation = $table_class_object->getCollation();
45 $table_info_num_rows = $table_class_object->getNumRows();
46 /* Define dependencies for the concerned controller */
47 $dependency_definitions = array(
48 'db' => $db,
49 'table' => $table,
50 'db_is_system_schema' => $db_is_system_schema,
51 'tbl_is_view' => $tbl_is_view,
52 'tbl_storage_engine' => $tbl_storage_engine,
53 'table_info_num_rows' => $table_info_num_rows,
54 'tbl_collation' => $tbl_collation,
55 'showtable' => $GLOBALS['showtable']
58 /** @var TableStructureController $controller */
59 $controller = $container->get('TableStructureController', $dependency_definitions);
60 $controller->indexAction();