Translated using Weblate (Sinhala)
[phpmyadmin.git] / tbl_structure.php
blob679e2cb4344611729db550d06b6e4207266b0d64
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 namespace PMA;
12 use PMA\libraries\controllers\table\TableStructureController;
13 use PMA\libraries\controllers\Table;
14 use PMA\libraries\Response;
16 require_once 'libraries/common.inc.php';
17 require_once 'libraries/config/messages.inc.php';
18 require_once 'libraries/config/user_preferences.forms.php';
19 require_once 'libraries/config/page_settings.forms.php';
21 $container = libraries\di\Container::getDefaultContainer();
22 $container->factory('PMA\libraries\controllers\table\TableStructureController');
23 $container->alias(
24 'TableStructureController',
25 'PMA\libraries\controllers\table\TableStructureController'
27 $container->set('PMA\libraries\Response', Response::getInstance());
28 $container->alias('response', 'PMA\libraries\Response');
30 global $db, $table, $db_is_system_schema, $tbl_is_view, $tbl_storage_engine,
31 $table_info_num_rows, $tbl_collation, $showtable;
32 $GLOBALS['dbi']->selectDb($GLOBALS['db']);
33 $table_class_object = $GLOBALS['dbi']->getTable(
34 $GLOBALS['db'],
35 $GLOBALS['table']
37 $reread_info = $table_class_object->getStatusInfo(null, true);
38 $GLOBALS['showtable'] = $table_class_object->getStatusInfo(null, (isset($reread_info) && $reread_info ? true : false));
39 if ($table_class_object->isView()) {
40 $tbl_is_view = true;
41 $tbl_storage_engine = __('View');
42 } else {
43 $tbl_is_view = false;
44 $tbl_storage_engine = $table_class_object->getStorageEngine();
46 $tbl_collation = $table_class_object->getCollation();
47 $table_info_num_rows = $table_class_object->getNumRows();
48 /* Define dependencies for the concerned controller */
49 $dependency_definitions = array(
50 'db' => $db,
51 'table' => $table,
52 'url_query' => &$GLOBALS['url_query'],
53 'db_is_system_schema' => $db_is_system_schema,
54 'tbl_is_view' => $tbl_is_view,
55 'tbl_storage_engine' => $tbl_storage_engine,
56 'table_info_num_rows' => $table_info_num_rows,
57 'tbl_collation' => $tbl_collation,
58 'showtable' => $GLOBALS['showtable']
61 /** @var TableStructureController $controller */
62 $controller = $container->get('TableStructureController', $dependency_definitions);
63 $controller->indexAction();