fixed URL generation where needed only & and not &
This commit is contained in:
@@ -33,7 +33,7 @@ if (!isset($is_db) || !$is_db) {
|
||||
$is_db = @PMA_mysql_select_db($db);
|
||||
}
|
||||
if (empty($db) || !$is_db) {
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url() . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url('', '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
exit();
|
||||
}
|
||||
} // end if (ensures db exists)
|
||||
@@ -47,7 +47,7 @@ if (!isset($message)) {
|
||||
?>
|
||||
<script type="text/javascript" language="javascript1.2">
|
||||
<!--
|
||||
window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url($db); ?>');
|
||||
window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url($db, '', '&'); ?>');
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
|
@@ -417,10 +417,10 @@ if (uname.value == '') {
|
||||
}
|
||||
} // end if
|
||||
if (!empty($GLOBALS['SERVER_SOFTWARE']) && $GLOBALS['SERVER_SOFTWARE'] == 'Microsoft-IIS/5.0') {
|
||||
header('Refresh: 0; url=' . $cfg['PmaAbsoluteUri'] . 'index.php3?' . PMA_generate_common_url());
|
||||
header('Refresh: 0; url=' . $cfg['PmaAbsoluteUri'] . 'index.php3?' . PMA_generate_common_url('', '', '&'));
|
||||
}
|
||||
else {
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'index.php3?' . PMA_generate_common_url());
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'index.php3?' . PMA_generate_common_url('', '', '&'));
|
||||
}
|
||||
exit();
|
||||
} // end if
|
||||
|
@@ -1074,7 +1074,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
// Reloads the navigation frame via JavaScript if required
|
||||
if (isset($GLOBALS['reload']) && $GLOBALS['reload']) {
|
||||
echo "\n";
|
||||
$reload_url = './left.php3?' . PMA_generate_common_url($GLOBALS['db']);
|
||||
$reload_url = './left.php3?' . PMA_generate_common_url($GLOBALS['db'], '', '&');
|
||||
?>
|
||||
<script type="text/javascript" language="javascript1.2">
|
||||
<!--
|
||||
|
@@ -13,7 +13,7 @@ if (!isset($is_db) || !$is_db) {
|
||||
$is_db = @PMA_mysql_select_db($db);
|
||||
}
|
||||
if (empty($db) || !$is_db) {
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url() . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url('', '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
exit();
|
||||
}
|
||||
} // end if (ensures db exists)
|
||||
@@ -24,7 +24,7 @@ if (!isset($is_table) || !$is_table) {
|
||||
}
|
||||
if (empty($table)
|
||||
|| !($is_table && @mysql_numrows($is_table))) {
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'db_details.php3?' . PMA_generate_common_url($db) . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'db_details.php3?' . PMA_generate_common_url($db, '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
exit();
|
||||
} else if (isset($is_table)) {
|
||||
mysql_free_result($is_table);
|
||||
|
@@ -63,19 +63,19 @@ if (!defined('PMA_URL_GENERATION_LIB_INCLUDED')){
|
||||
*
|
||||
* @author nijel
|
||||
*/
|
||||
function PMA_generate_common_url ($db = '', $table = '')
|
||||
function PMA_generate_common_url ($db = '', $table = '', $amp = '&')
|
||||
{
|
||||
global $lang, $convcharset, $server;
|
||||
global $cfg, $allow_recoding;
|
||||
|
||||
$result = 'lang=' . $lang
|
||||
. '&server=' . $server;
|
||||
. $amp . 'server=' . $server;
|
||||
if (isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)
|
||||
$result .= '&convcharset=' . $convcharset;
|
||||
$result .= $amp . 'convcharset=' . $convcharset;
|
||||
if (!empty($db))
|
||||
$result .= '&db='.urlencode($db);
|
||||
$result .= $amp . 'db='.urlencode($db);
|
||||
if (!empty($table))
|
||||
$result .= '&table='.urlencode($table);
|
||||
$result .= $amp . 'table='.urlencode($table);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ else if (isset($reload) && $reload) {
|
||||
?>
|
||||
<script type="text/javascript" language="javascript1.2">
|
||||
<!--
|
||||
window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url(); ?>');
|
||||
window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url('', '', '&'); ?>');
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
|
@@ -40,7 +40,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
|
||||
$is_db = @PMA_mysql_select_db($db);
|
||||
}
|
||||
if (empty($db) || !$is_db) {
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url() . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . 'main.php3?' . PMA_generate_common_url('', '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
exit();
|
||||
}
|
||||
// Not a valid table name -> back to the default db_details sub-page
|
||||
@@ -49,7 +49,7 @@ if (!defined('PMA_IDX_INCLUDED')) {
|
||||
}
|
||||
if (empty($table)
|
||||
|| !($is_table && @mysql_numrows($is_table))) {
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db) . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
header('Location: ' . $cfg['PmaAbsoluteUri'] . $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db, '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
exit();
|
||||
} else if (isset($is_table)) {
|
||||
mysql_free_result($is_table);
|
||||
|
@@ -23,7 +23,7 @@ if (!isset($dontlimitchars)) {
|
||||
$is_gotofile = FALSE;
|
||||
if (isset($after_insert) && $after_insert == 'new_insert') {
|
||||
$goto = 'tbl_change.php3?'
|
||||
. PMA_generate_common_url($db, $table)
|
||||
. PMA_generate_common_url($db, $table, '&')
|
||||
. '&goto=' . urlencode($goto)
|
||||
. '&pos=' . $pos
|
||||
. '&session_max_rows=' . $session_max_rows
|
||||
@@ -33,7 +33,7 @@ if (isset($after_insert) && $after_insert == 'new_insert') {
|
||||
. (empty($sql_query) ? '' : '&sql_query=' . urlencode($sql_query));
|
||||
} else if ($goto == 'sql.php3') {
|
||||
$goto = 'sql.php3?'
|
||||
. PMA_generate_common_url($db, $table)
|
||||
. PMA_generate_common_url($db, $table, '&')
|
||||
. '&pos=' . $pos
|
||||
. '&session_max_rows=' . $session_max_rows
|
||||
. '&disp_direction=' . $disp_direction
|
||||
|
Reference in New Issue
Block a user