Merge branch 'QA_4_6'
This commit is contained in:
commit
298efcf139
@ -19,6 +19,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #12125 Cannot highlight a column if I scroll down from the top of the table
|
||||
- issue #12154 Fixed possible PHP error in SQL parser
|
||||
- issue #12029 Fixed SQL quoting in SQL export
|
||||
- issue #12129 Improve performance of database structure page
|
||||
|
||||
4.6.0.0 (2016-03-22)
|
||||
+ issue #11456 Disabled storage engines
|
||||
|
||||
@ -15,18 +15,6 @@ use PMA\libraries\Util;
|
||||
require_once 'libraries/common.inc.php';
|
||||
require_once 'libraries/db_common.inc.php';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
$sub_part,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
$tooltip_truename,
|
||||
$tooltip_aliasname,
|
||||
$pos
|
||||
) = Util::getDbInfo($GLOBALS['db'], '_structure');
|
||||
|
||||
$container = libraries\di\Container::getDefaultContainer();
|
||||
$container->factory(
|
||||
'PMA\libraries\controllers\database\DatabaseStructureController'
|
||||
@ -38,16 +26,10 @@ $container->alias(
|
||||
$container->set('PMA\libraries\Response', Response::getInstance());
|
||||
$container->alias('response', 'PMA\libraries\Response');
|
||||
|
||||
global $db, $pos, $db_is_system_schema, $total_num_tables, $tables, $num_tables;
|
||||
/* Define dependencies for the concerned controller */
|
||||
$dependency_definitions = array(
|
||||
'db' => $db,
|
||||
'url_query' => &$GLOBALS['url_query'],
|
||||
'pos' => $pos,
|
||||
'db_is_system_schema' => $db_is_system_schema,
|
||||
'num_tables' => $num_tables,
|
||||
'total_num_tables' => $total_num_tables,
|
||||
'tables' => $tables,
|
||||
);
|
||||
|
||||
/** @var DatabaseStructureController $controller */
|
||||
|
||||
@ -64,26 +64,40 @@ class DatabaseStructureController extends DatabaseController
|
||||
/**
|
||||
* DatabaseStructureController constructor
|
||||
*
|
||||
* @param string $url_query URL query
|
||||
* @param int $num_tables Number of tables
|
||||
* @param int $pos Current position in the list
|
||||
* @param bool $db_is_system_schema DB is information_schema
|
||||
* @param int $total_num_tables Number of tables
|
||||
* @param array $tables Tables in the DB
|
||||
* @param bool $is_show_stats Whether stats show or not
|
||||
* @param string $url_query URL query
|
||||
*/
|
||||
public function __construct(
|
||||
$url_query, $num_tables, $pos, $db_is_system_schema,
|
||||
$total_num_tables, $tables, $is_show_stats
|
||||
) {
|
||||
public function __construct($url_query) {
|
||||
parent::__construct();
|
||||
|
||||
$this->_url_query = $url_query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves databse information for further use
|
||||
*
|
||||
* @param string $sub_part Page part name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _getDbInfo($sub_part)
|
||||
{
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
,
|
||||
,
|
||||
$pos
|
||||
) = Util::getDbInfo($GLOBALS['db'], $sub_part);
|
||||
|
||||
$this->_tables = $tables;
|
||||
$this->_num_tables = $num_tables;
|
||||
$this->_pos = $pos;
|
||||
$this->_db_is_system_schema = $db_is_system_schema;
|
||||
$this->_total_num_tables = $total_num_tables;
|
||||
$this->_tables = $tables;
|
||||
$this->_is_show_stats = $is_show_stats;
|
||||
}
|
||||
|
||||
@ -127,28 +141,7 @@ class DatabaseStructureController extends DatabaseController
|
||||
$this->_url_query .= '&goto=db_structure.php';
|
||||
|
||||
// Gets the database structure
|
||||
$sub_part = '_structure';
|
||||
|
||||
list(
|
||||
$tables,
|
||||
$num_tables,
|
||||
$total_num_tables,
|
||||
,
|
||||
$is_show_stats,
|
||||
$db_is_system_schema,
|
||||
,
|
||||
,
|
||||
$pos
|
||||
) = Util::getDbInfo($GLOBALS['db'], $sub_part);
|
||||
|
||||
$this->_tables = $tables;
|
||||
// updating $tables seems enough for #11376, but updating other
|
||||
// variables too in case they may cause some other problem.
|
||||
$this->_num_tables = $num_tables;
|
||||
$this->_pos = $pos;
|
||||
$this->_db_is_system_schema = $db_is_system_schema;
|
||||
$this->_total_num_tables = $total_num_tables;
|
||||
$this->_is_show_stats = $is_show_stats;
|
||||
$this->_getDbInfo('_structure');
|
||||
|
||||
include_once 'libraries/replication.inc.php';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user