Translated using Weblate (Russian)
[phpmyadmin.git] / tbl_structure.php
blob0134b13821ab0789db08023eab9851edf2ce15b0
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';
16 $container = Container::getDefaultContainer();
17 $container->factory('PhpMyAdmin\Controllers\Table\TableStructureController');
18 $container->alias(
19 'TableStructureController',
20 'PhpMyAdmin\Controllers\Table\TableStructureController'
22 $container->set('PhpMyAdmin\Response', Response::getInstance());
23 $container->alias('response', 'PhpMyAdmin\Response');
25 global $db, $table, $db_is_system_schema, $tbl_is_view, $tbl_storage_engine,
26 $table_info_num_rows, $tbl_collation, $showtable;
27 $GLOBALS['dbi']->selectDb($GLOBALS['db']);
28 $table_class_object = $GLOBALS['dbi']->getTable(
29 $GLOBALS['db'],
30 $GLOBALS['table']
32 $reread_info = $table_class_object->getStatusInfo(null, true);
33 $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ? true : false));
34 if ($table_class_object->isView()) {
35 $tbl_is_view = true;
36 $tbl_storage_engine = __('View');
37 } else {
38 $tbl_is_view = false;
39 $tbl_storage_engine = $table_class_object->getStorageEngine();
41 $tbl_collation = $table_class_object->getCollation();
42 $table_info_num_rows = $table_class_object->getNumRows();
43 /* Define dependencies for the concerned controller */
44 $dependency_definitions = array(
45 'db' => $db,
46 'table' => $table,
47 'db_is_system_schema' => $db_is_system_schema,
48 'tbl_is_view' => $tbl_is_view,
49 'tbl_storage_engine' => $tbl_storage_engine,
50 'table_info_num_rows' => $table_info_num_rows,
51 'tbl_collation' => $tbl_collation,
52 'showtable' => $GLOBALS['showtable']
55 /** @var TableStructureController $controller */
56 $controller = $container->get('TableStructureController', $dependency_definitions);
57 $controller->indexAction();