diff --git a/db_create.php b/db_create.php index 85443a466e..902cc22e02 100644 --- a/db_create.php +++ b/db_create.php @@ -20,7 +20,7 @@ require 'libraries/build_html_for_db.lib.php'; /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'index.php?' . PMA_URL_getCommon(); +$err_url = 'index.php' . PMA_URL_getCommon(); /** * Builds and executes the db creation sql query @@ -80,7 +80,7 @@ if (! $result) { $is_superuser = $GLOBALS['dbi']->isSuperuser(); $column_order = PMA_getColumnOrder(); - $url_query = PMA_URL_getCommon($_POST['new_db']); + $url_query = PMA_URL_getCommon(array('db' => $_POST['new_db'])); /** * String that will contain the output HTML diff --git a/db_datadict.php b/db_datadict.php index 5eb84dc68a..a0e0634d95 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -36,7 +36,7 @@ PMA_Util::checkParameters(array('db')); /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'db_sql.php?' . PMA_URL_getCommon($db); +$err_url = 'db_sql.php' . PMA_URL_getCommon(array('db' => $db)); if ($cfgRelation['commwork']) { $comment = PMA_getDbComment($db); diff --git a/db_printview.php b/db_printview.php index 56edcbe9c4..d537451802 100644 --- a/db_printview.php +++ b/db_printview.php @@ -21,7 +21,7 @@ PMA_Util::checkParameters(array('db')); /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'db_sql.php?' . PMA_URL_getCommon($db); +$err_url = 'db_sql.php' . PMA_URL_getCommon($db); /** * Settings for relations stuff diff --git a/db_structure.php b/db_structure.php index 79538faebc..f07ba61083 100644 --- a/db_structure.php +++ b/db_structure.php @@ -34,7 +34,7 @@ if ((!empty($_POST['submit_mult']) && isset($_POST['selected_tbl'])) || isset($_POST['mult_btn']) ) { $action = 'db_structure.php'; - $err_url = 'db_structure.php?' . PMA_URL_getCommon($db); + $err_url = 'db_structure.php' . PMA_URL_getCommon(array('db' => $db)); // see bug #2794840; in this case, code path is: // db_structure.php -> libraries/mult_submits.inc.php -> sql.php diff --git a/export.php b/export.php index ebdbbd5711..fb37c14121 100644 --- a/export.php +++ b/export.php @@ -241,11 +241,11 @@ if (!defined('TESTSUITE')) { /** @var PMA_String $pmaString */ $pmaString = $GLOBALS['PMA_String']; if ($export_type == 'server') { - $err_url = 'server_export.php?' . PMA_URL_getCommon(); + $err_url = 'server_export.php' . PMA_URL_getCommon(); } elseif ($export_type == 'database' && $pmaString->strlen($db) ) { - $err_url = 'db_export.php?' . PMA_URL_getCommon($db); + $err_url = 'db_export.php' . PMA_URL_getCommon(array('db' => $db)); // Check if we have something to export if (isset($table_select)) { $tables = $table_select; @@ -255,7 +255,9 @@ if (!defined('TESTSUITE')) { } elseif ($export_type == 'table' && $pmaString->strlen($db) && $pmaString->strlen($table) ) { - $err_url = 'tbl_export.php?' . PMA_URL_getCommon($db, $table); + $err_url = 'tbl_export.php' . PMA_URL_getCommon(array( + 'db' => $db, 'table' => $table + )); } else { PMA_fatalError(__('Bad parameters!')); } diff --git a/import.php b/import.php index 24dc56d422..dc831c429d 100644 --- a/import.php +++ b/import.php @@ -227,15 +227,17 @@ $pmaString = $GLOBALS['PMA_String']; // Create error and goto url if ($import_type == 'table') { - $err_url = 'tbl_import.php?' . PMA_URL_getCommon($db, $table); + $err_url = 'tbl_import.php' . PMA_URL_getCommon(array( + 'db' => $db, 'table' => $table + )); $_SESSION['Import_message']['go_back_url'] = $err_url; $goto = 'tbl_import.php'; } elseif ($import_type == 'database') { - $err_url = 'db_import.php?' . PMA_URL_getCommon($db); + $err_url = 'db_import.php' . PMA_URL_getCommon(array('db' => $db)); $_SESSION['Import_message']['go_back_url'] = $err_url; $goto = 'db_import.php'; } elseif ($import_type == 'server') { - $err_url = 'server_import.php?' . PMA_URL_getCommon(); + $err_url = 'server_import.php' . PMA_URL_getCommon(); $_SESSION['Import_message']['go_back_url'] = $err_url; $goto = 'server_import.php'; } else { @@ -249,13 +251,13 @@ if ($import_type == 'table') { } } if ($pmaString->strlen($table) && $pmaString->strlen($db)) { - $common = PMA_URL_getCommon($db, $table); + $common = PMA_URL_getCommon(array('db' => $db, 'table' => $table)); } elseif ($pmaString->strlen($db)) { - $common = PMA_URL_getCommon($db); + $common = PMA_URL_getCommon(array('db' => $db)); } else { $common = PMA_URL_getCommon(); } - $err_url = $goto . '?' . $common + $err_url = $goto . $common . (preg_match('@^tbl_[a-z]*\.php$@', $goto) ? '&table=' . htmlspecialchars($table) : ''); diff --git a/index.php b/index.php index 2d33c3939b..4a38afb5a7 100644 --- a/index.php +++ b/index.php @@ -88,7 +88,7 @@ if (! empty($message)) { unset($message); } -$common_url_query = PMA_URL_getCommon('', ''); +$common_url_query = PMA_URL_getCommon(); $mysql_cur_user_and_host = ''; // when $server > 0, a server has been chosen so we can display @@ -172,7 +172,7 @@ if ($server > 0 || count($cfg['Servers']) > 1 PMA_printListItem( PMA_Util::getImage('s_passwd.png') . " " . __('Change password'), 'li_change_password', - 'user_password.php?' . $common_url_query, + 'user_password.php' . $common_url_query, null, null, 'change_password_anchor', @@ -240,7 +240,7 @@ if ($server > 0) { PMA_printListItem( PMA_Util::getImage('b_tblops.png') . " " . __('More settings'), 'li_user_preferences', - 'prefs_manage.php?' . $common_url_query, + 'prefs_manage.php' . $common_url_query, null, null, null, @@ -335,7 +335,7 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) { PMA_printListItem( __('Show PHP information'), 'li_phpinfo', - 'phpinfo.php?' . $common_url_query, + 'phpinfo.php' . $common_url_query, null, '_blank' ); @@ -530,7 +530,7 @@ if ($server > 0) { } $msg = PMA_Message::notice($msg_text); $msg->addParam( - '', false ); diff --git a/libraries/Advisor.class.php b/libraries/Advisor.class.php index 593d55a996..0d274422b5 100644 --- a/libraries/Advisor.class.php +++ b/libraries/Advisor.class.php @@ -241,7 +241,7 @@ class Advisor // linking to server_variables.php $rule['recommendation'] = preg_replace( '/\{([a-z_0-9]+)\}/Ui', - '\1', $this->translate($rule['recommendation']) ); diff --git a/libraries/DbSearch.class.php b/libraries/DbSearch.class.php index d0832787dd..f4b8a3b51e 100644 --- a/libraries/DbSearch.class.php +++ b/libraries/DbSearch.class.php @@ -347,7 +347,9 @@ class PMA_DbSearch $html_output .= '