Use PMA_URL_getCommon for generating all params
This commit is contained in:
parent
ae14690b9c
commit
b2e1f81c0c
@ -209,17 +209,28 @@ class PMA_ServerStatusData
|
||||
// variable or section name => (name => url)
|
||||
$links = array();
|
||||
|
||||
$links['table'][__('Flush (close) all tables')]
|
||||
= $this->selfUrl . '?flush=TABLES&' . PMA_URL_getCommon();
|
||||
$links['table'][__('Flush (close) all tables')] = $this->selfUrl
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'flush' => 'TABLES'
|
||||
)
|
||||
);
|
||||
$links['table'][__('Show open tables')]
|
||||
= 'sql.php?sql_query=' . urlencode('SHOW OPEN TABLES') .
|
||||
'&goto=' . $this->selfUrl . '&' . PMA_URL_getCommon();
|
||||
= 'sql.php' . PMA_URL_getCommon(
|
||||
array(
|
||||
'sql_query' => 'SHOW OPEN TABLES',
|
||||
'goto' => $this->selfUrl,
|
||||
)
|
||||
);
|
||||
|
||||
if ($GLOBALS['server_master_status']) {
|
||||
$links['repl'][__('Show slave hosts')]
|
||||
= 'sql.php?sql_query=' . urlencode('SHOW SLAVE HOSTS')
|
||||
. '&goto=' . $this->selfUrl . '&'
|
||||
. PMA_URL_getCommon();
|
||||
= 'sql.php' . PMA_URL_getCommon(
|
||||
array(
|
||||
'sql_query' => 'SHOW SLAVE HOSTS',
|
||||
'goto' => $this->selfUrl,
|
||||
)
|
||||
);
|
||||
$links['repl'][__('Show master status')] = '#replication_master';
|
||||
}
|
||||
if ($GLOBALS['server_slave_status']) {
|
||||
@ -229,8 +240,12 @@ class PMA_ServerStatusData
|
||||
$links['repl']['doc'] = 'replication';
|
||||
|
||||
$links['qcache'][__('Flush query cache')]
|
||||
= $this->selfUrl . '?flush=' . urlencode('QUERY CACHE') . '&' .
|
||||
PMA_URL_getCommon();
|
||||
= $this->selfUrl
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'flush' => 'QUERY CACHE'
|
||||
)
|
||||
);
|
||||
$links['qcache']['doc'] = 'query_cache';
|
||||
|
||||
$links['threads']['doc'] = 'mysql_threads';
|
||||
@ -244,8 +259,13 @@ class PMA_ServerStatusData
|
||||
$links['innodb'][__('Variables')]
|
||||
= 'server_engines.php?engine=InnoDB&' . PMA_URL_getCommon();
|
||||
$links['innodb'][__('InnoDB Status')]
|
||||
= 'server_engines.php?engine=InnoDB&page=Status&' .
|
||||
PMA_URL_getCommon();
|
||||
= 'server_engines.php'
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'engine' => 'InnoDB',
|
||||
'page' => 'Status'
|
||||
)
|
||||
);
|
||||
$links['innodb']['doc'] = 'innodb';
|
||||
|
||||
|
||||
|
||||
@ -733,9 +733,14 @@ function PMA_getForeignLink($column, $backup_field, $column_name_appendix,
|
||||
$html_output .= '<a class="foreign_values_anchor" target="_blank" '
|
||||
. 'onclick="window.open(this.href,\'foreigners\', \'width=640,height=240,'
|
||||
. 'scrollbars=yes,resizable=yes\'); return false;" '
|
||||
. 'href="browse_foreigners.php?'
|
||||
. PMA_URL_getCommon($db, $table) . '&field='
|
||||
. PMA_escapeJsString(urlencode($column['Field']) . $rownumber_param) . '">'
|
||||
. 'href="browse_foreigners.php'
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'field' => $column['Field'] . $rownumber_param
|
||||
)
|
||||
) . '">'
|
||||
. str_replace("'", "\'", $titles['Browse']) . '</a>';
|
||||
return $html_output;
|
||||
}
|
||||
|
||||
@ -729,10 +729,15 @@ function PMA_getHtmlForBookmark($disp_mode, $cfgBookmark, $sql_query, $db, $tabl
|
||||
&& ! empty($sql_query)
|
||||
) {
|
||||
$html = "\n";
|
||||
$goto = 'sql.php?'
|
||||
. PMA_URL_getCommon($db, $table)
|
||||
. '&sql_query=' . urlencode($sql_query)
|
||||
. '&id_bookmark=1';
|
||||
$goto = 'sql.php'
|
||||
. PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'sql_query' => $sql_query,
|
||||
'id_bookmark'=> 1,
|
||||
)
|
||||
)
|
||||
$bkm_sql_query = urlencode(
|
||||
isset($complete_query) ? $complete_query : $sql_query
|
||||
);
|
||||
|
||||
10
sql.php
10
sql.php
@ -164,9 +164,13 @@ if (isset($_POST['store_bkm'])) {
|
||||
*/
|
||||
if ($goto == 'sql.php') {
|
||||
$is_gotofile = false;
|
||||
$goto = 'sql.php?'
|
||||
. PMA_URL_getCommon($db, $table)
|
||||
. '&sql_query=' . urlencode($sql_query);
|
||||
$goto = 'sql.php' . PMA_URL_getCommon(
|
||||
array(
|
||||
'db' => $db,
|
||||
'table' => $table,
|
||||
'sql_query' => $sql_query.
|
||||
)
|
||||
);
|
||||
} // end if
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user