Remove _url_query attribute from DatabaseStructureController.php
It was used only in two locations and in both of them the different URL query was constructed, so it's better to contruct new queries directly. Fixes #13373 Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
parent
6c376de12a
commit
fc9140c0c5
@ -29,7 +29,6 @@ $container->alias('response', 'PMA\libraries\Response');
|
||||
/* Define dependencies for the concerned controller */
|
||||
$dependency_definitions = array(
|
||||
'db' => $db,
|
||||
'url_query' => &$GLOBALS['url_query'],
|
||||
);
|
||||
|
||||
/** @var DatabaseStructureController $controller */
|
||||
|
||||
@ -34,10 +34,6 @@ require_once 'libraries/config/page_settings.forms.php';
|
||||
*/
|
||||
class DatabaseStructureController extends DatabaseController
|
||||
{
|
||||
/**
|
||||
* @var string The URL query string
|
||||
*/
|
||||
protected $_url_query;
|
||||
/**
|
||||
* @var int Number of tables
|
||||
*/
|
||||
@ -63,17 +59,6 @@ class DatabaseStructureController extends DatabaseController
|
||||
*/
|
||||
protected $_is_show_stats;
|
||||
|
||||
/**
|
||||
* DatabaseStructureController constructor
|
||||
*
|
||||
* @param string $url_query URL query
|
||||
*/
|
||||
public function __construct($url_query) {
|
||||
parent::__construct();
|
||||
|
||||
$this->_url_query = $url_query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves databse information for further use
|
||||
*
|
||||
@ -142,8 +127,6 @@ class DatabaseStructureController extends DatabaseController
|
||||
)
|
||||
);
|
||||
|
||||
$this->_url_query .= '&goto=db_structure.php';
|
||||
|
||||
// Gets the database structure
|
||||
$this->_getDbInfo('_structure');
|
||||
|
||||
@ -220,7 +203,12 @@ class DatabaseStructureController extends DatabaseController
|
||||
/* Printable view of a table */
|
||||
$this->response->addHTML(
|
||||
Template::get('database/structure/print_view_data_dictionary_link')
|
||||
->render(array('url_query' => $this->_url_query))
|
||||
->render(array('url_query' => URL::getCommon(
|
||||
array(
|
||||
'db' => $this->db,
|
||||
'goto' => 'db_structure.php',
|
||||
)
|
||||
)))
|
||||
);
|
||||
|
||||
if (empty($this->_db_is_system_schema)) {
|
||||
@ -419,8 +407,9 @@ class DatabaseStructureController extends DatabaseController
|
||||
|
||||
$table_is_view = false;
|
||||
// Sets parameters for links
|
||||
$tbl_url_query = $this->_url_query
|
||||
. '&table=' . htmlspecialchars($current_table['TABLE_NAME']);
|
||||
$tbl_url_query = URL::getCommon(
|
||||
array('db' => $this->db, 'table' => $current_table['TABLE_NAME'])
|
||||
);
|
||||
// do not list the previous table's size info for a view
|
||||
|
||||
list($current_table, $formatted_size, $unit, $formatted_overhead,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user