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 .= '' . __('Browse') . ''; $this_url_params['sql_query'] = $newsearchsqls['delete']; diff --git a/libraries/Header.class.php b/libraries/Header.class.php index 86771a7431..07d1b9449c 100644 --- a/libraries/Header.class.php +++ b/libraries/Header.class.php @@ -221,7 +221,7 @@ class PMA_Header $pftext = ! empty($_SESSION['tmpval']['pftext']) ? $_SESSION['tmpval']['pftext'] : ''; return array( - 'common_query' => PMA_URL_getCommon('', '', '&'), + 'common_query' => PMA_URL_getCommon(array(), 'text', '&'), 'opendb_url' => $GLOBALS['cfg']['DefaultTabDatabase'], 'safari_browser' => PMA_USR_BROWSER_AGENT == 'SAFARI' ? 1 : 0, 'collation_connection' => $GLOBALS['collation_connection'], diff --git a/libraries/Menu.class.php b/libraries/Menu.class.php index 76fb4f2290..d61a52bbd7 100644 --- a/libraries/Menu.class.php +++ b/libraries/Menu.class.php @@ -218,7 +218,7 @@ class PMA_Menu $retval .= sprintf( $item, $GLOBALS['cfg']['DefaultTabDatabase'], - PMA_URL_getCommon($this->_db), + PMA_URL_getCommon(array('db' => $this->_db)), htmlspecialchars($this->_db), __('Database') ); @@ -241,7 +241,9 @@ class PMA_Menu $retval .= sprintf( $item, $GLOBALS['cfg']['DefaultTabTable'], - PMA_URL_getCommon($this->_db, $this->_table), + PMA_URL_getCommon(array( + 'db' => $this->_db, 'table' => $this->_table + )), str_replace(' ', ' ', htmlspecialchars($this->_table)), $tbl_is_view ? __('View') : __('Table') ); diff --git a/libraries/ServerStatusData.class.php b/libraries/ServerStatusData.class.php index bf24f6745d..3806dfe365 100644 --- a/libraries/ServerStatusData.class.php +++ b/libraries/ServerStatusData.class.php @@ -259,7 +259,8 @@ class PMA_ServerStatusData $links['Slow_queries']['doc'] = 'slow_query_log'; $links['innodb'][__('Variables')] - = 'server_engines.php?engine=InnoDB&' . PMA_URL_getCommon(); + = 'server_engines.php?engine=InnoDB&' + . PMA_URL_getCommon(array(), 'html', ''); $links['innodb'][__('InnoDB Status')] = 'server_engines.php' . PMA_URL_getCommon( diff --git a/libraries/TableSearch.class.php b/libraries/TableSearch.class.php index 3590c38458..9fd0033003 100644 --- a/libraries/TableSearch.class.php +++ b/libraries/TableSearch.class.php @@ -236,7 +236,7 @@ class PMA_TableSearch . ' size="40" class="textfield" id="field_' . $column_index . '" />'; if ($in_fbs) { - $edit_url = 'gis_data_editor.php?' . PMA_URL_getCommon(); + $edit_url = 'gis_data_editor.php' . PMA_URL_getCommon(); $edit_str = PMA_Util::getIcon('b_edit.png', __('Edit/Insert')); $html_output .= ''; $html_output .= PMA_Util::linkOrButton( @@ -285,10 +285,9 @@ class PMA_TableSearch : '') . ' />'; - $html_output .= <<'; diff --git a/libraries/db_common.inc.php b/libraries/db_common.inc.php index 4f54062b4f..e074b18186 100644 --- a/libraries/db_common.inc.php +++ b/libraries/db_common.inc.php @@ -26,8 +26,9 @@ if ($db_is_system_schema) { /** * Defines the urls to return to in case of error in a sql statement */ -$err_url_0 = 'index.php?' . PMA_URL_getCommon(); -$err_url = $cfg['DefaultTabDatabase'] . '?' . PMA_URL_getCommon($db); +$err_url_0 = 'index.php' . PMA_URL_getCommon(); +$err_url = $cfg['DefaultTabDatabase'] + . PMA_URL_getCommon(array('db' => $db)); /** @var PMA_String $pmaString */ $pmaString = $GLOBALS['PMA_String']; @@ -50,8 +51,8 @@ if (! isset($is_db) || ! $is_db) { $is_db = false; } // Not a valid db name -> back to the welcome page - $uri = $cfg['PmaAbsoluteUri'] . 'index.php?' - . PMA_URL_getCommon('', '', '&') + $uri = $cfg['PmaAbsoluteUri'] . 'index.php' + . PMA_URL_getCommon(array(), 'text', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1'; if (!$pmaString->strlen($db) || ! $is_db) { $response = PMA_Response::getInstance(); @@ -99,6 +100,6 @@ if (isset($_REQUEST['submitcollation']) /** * Set parameters for links */ -$url_query = PMA_URL_getCommon($db); +$url_query = PMA_URL_getCommon(array('db' => $db)); ?> diff --git a/libraries/db_table_exists.lib.php b/libraries/db_table_exists.lib.php index ffc9275fef..74af452cdd 100644 --- a/libraries/db_table_exists.lib.php +++ b/libraries/db_table_exists.lib.php @@ -42,7 +42,7 @@ if (empty($is_db)) { } PMA_sendHeaderLocation( $cfg['PmaAbsoluteUri'] . 'index.php' - . PMA_URL_getCommon($url_params, '&') + . PMA_URL_getCommon($url_params, 'text', '&') ); } exit; diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php index b191ecadfa..2d1fc5b932 100644 --- a/libraries/display_import.lib.php +++ b/libraries/display_import.lib.php @@ -442,7 +442,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id) { //some variable for javascript $ajax_url = "import_status.php?id=" . $upload_id . "&" - . PMA_URL_getCommon(array('import_status'=>1), '&'); + . PMA_URL_getCommon(array('import_status'=>1), 'text', '&'); $promot_str = PMA_jsFormat( __( 'The file being uploaded is probably larger than ' @@ -460,7 +460,7 @@ function PMA_getHtmlForImportWithPlugin($upload_id) __('The file is being processed, please be patient.'), false ); - $import_url = PMA_URL_getCommon(array('import_status'=>1), '&'); + $import_url = PMA_URL_getCommon(array('import_status'=>1), 'text', '&'); //start output $html = 'var finished = false; '; diff --git a/libraries/export.lib.php b/libraries/export.lib.php index 6042467c2b..ebd752fbb6 100644 --- a/libraries/export.lib.php +++ b/libraries/export.lib.php @@ -437,11 +437,13 @@ function PMA_getHtmlForDisplayedExportHeader($export_type, $db, $table) */ $back_button = '

[ '; $html .= '' . htmlspecialchars($hiddenItem) . ''; - $html .= ''; $retval .= PMA_Util::getNavigationLink( - 'index.php?' . PMA_URL_getCommon(), + 'index.php' . PMA_URL_getCommon(), $showText, __('Home'), $showIcon, diff --git a/libraries/navigation/Nodes/Node_Database.class.php b/libraries/navigation/Nodes/Node_Database.class.php index 8944e54738..a53422c609 100644 --- a/libraries/navigation/Nodes/Node_Database.class.php +++ b/libraries/navigation/Nodes/Node_Database.class.php @@ -517,7 +517,7 @@ class Node_Database extends Node ); if ($count > 0) { $ret = '' - . 'realParent()->real_name; $item = $this->real_name; $ret = '' - . '' . "\n"; echo ' ' . $error_message . "\n"; echo '

' . "\n"; - echo ' $GLOBALS['db'])) . '&page=' . htmlspecialchars($pageNumber) . '">' . __('Back') . ''; echo "\n"; exit; diff --git a/libraries/replication_gui.lib.php b/libraries/replication_gui.lib.php index 030d2d023c..c8658ed91d 100644 --- a/libraries/replication_gui.lib.php +++ b/libraries/replication_gui.lib.php @@ -953,7 +953,7 @@ function PMA_handleControlRequest() } else { PMA_sendHeaderLocation( $GLOBALS['cfg']['PmaAbsoluteUri'] . 'server_replication.php' - . PMA_URL_getCommon($GLOBALS['url_params'], '&') + . PMA_URL_getCommon($GLOBALS['url_params'], 'text', '&') ); } } diff --git a/libraries/rte/rte_main.inc.php b/libraries/rte/rte_main.inc.php index 713f61dbcf..88f21894ce 100644 --- a/libraries/rte/rte_main.inc.php +++ b/libraries/rte/rte_main.inc.php @@ -38,7 +38,9 @@ if ($GLOBALS['is_ajax_request'] != true) { if ($GLOBALS['PMA_String']->strlen($db)) { $GLOBALS['dbi']->selectDb($db); if (! isset($url_query)) { - $url_query = PMA_URL_getCommon($db, $table); + $url_query = PMA_URL_getCommon(array( + 'db' => $db, 'table' => $table + )); } } } diff --git a/libraries/server_common.inc.php b/libraries/server_common.inc.php index b6372a65c6..1b69ba3808 100644 --- a/libraries/server_common.inc.php +++ b/libraries/server_common.inc.php @@ -22,7 +22,7 @@ if (empty($viewing_mode)) { /** * Set parameters for links */ -$GLOBALS['url_query'] = PMA_URL_getCommon($db); +$GLOBALS['url_query'] = PMA_URL_getCommon(array('db' => $db)); /** * Defines the urls to return to in case of error in a sql statement diff --git a/libraries/server_databases.lib.php b/libraries/server_databases.lib.php index ca25d000c2..5fbf45c928 100644 --- a/libraries/server_databases.lib.php +++ b/libraries/server_databases.lib.php @@ -461,7 +461,7 @@ function PMA_dropMultiDatabases() } else { $action = 'server_databases.php'; $submit_mult = 'drop_db'; - $err_url = 'server_databases.php?' . PMA_URL_getCommon(); + $err_url = 'server_databases.php' . PMA_URL_getCommon(); if (isset($_REQUEST['selected_dbs']) && !isset($_REQUEST['is_js_confirmed']) ) { diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php index 109127a341..1ad6add170 100644 --- a/libraries/server_privileges.lib.php +++ b/libraries/server_privileges.lib.php @@ -1880,8 +1880,8 @@ function PMA_getHtmlForSpecificDbPrivileges($db) . ' ' . sprintf( __('Users having access to "%s"'), - '' + '' . htmlspecialchars($db) . '' ) diff --git a/libraries/server_status_variables.lib.php b/libraries/server_status_variables.lib.php index 3e3300a7fa..860ecd91ec 100644 --- a/libraries/server_status_variables.lib.php +++ b/libraries/server_status_variables.lib.php @@ -37,7 +37,7 @@ function PMA_getHtmlForFilter($ServerStatusData) $retval = ''; $retval .= '
'; $retval .= '' . __('Filters') . ''; - $retval .= '
'; $retval .= ''; $retval .= '
'; diff --git a/libraries/server_variables.lib.php b/libraries/server_variables.lib.php index e516942d03..9206baa6e7 100644 --- a/libraries/server_variables.lib.php +++ b/libraries/server_variables.lib.php @@ -149,7 +149,7 @@ function PMA_formatVariable($name, $value, $variable_doc_links) */ function PMA_getHtmlForLinkTemplates() { - $url = 'server_variables.php' . PMA_URL_getCommon(array()); + $url = 'server_variables.php' . PMA_URL_getCommon(); $output = ''; $output .= ' $db)) . '"'; $tmp_db_link .= '>' . htmlspecialchars($db) . ''; // else use @@ -192,7 +192,7 @@ function PMA_getHtmlForSqlQueryFormInsert( ); $tmp_db_link = ' $db)) . '"'; $tmp_db_link .= '>' . htmlspecialchars($db) . ''; // else use diff --git a/libraries/structure.lib.php b/libraries/structure.lib.php index 08f3a87eee..4435bef2ac 100644 --- a/libraries/structure.lib.php +++ b/libraries/structure.lib.php @@ -2475,7 +2475,9 @@ function PMA_columnNeedsAlterTable($i) */ function PMA_updateColumns($db, $table) { - $err_url = 'tbl_structure.php?' . PMA_URL_getCommon($db, $table); + $err_url = 'tbl_structure.php' . PMA_URL_getCommon(array( + 'db' => $db, 'table' => $table + )); $regenerate = false; $field_cnt = count($_REQUEST['field_name']); $key_fields = array(); diff --git a/libraries/tbl_columns_definition_form.lib.php b/libraries/tbl_columns_definition_form.lib.php index f114dfc67c..4e81d1e204 100644 --- a/libraries/tbl_columns_definition_form.lib.php +++ b/libraries/tbl_columns_definition_form.lib.php @@ -316,8 +316,8 @@ function PMA_getHeaderCells($is_backup, $columnMeta, $mimework, $db, $table) if ($mimework && $GLOBALS['cfg']['BrowseMIME']) { $header_cells[] = __('MIME type'); - $header_link = ' $db, 'table' => $table)) . '#%s" title="' . __( 'List of available transformations and their options' ) diff --git a/libraries/tbl_common.inc.php b/libraries/tbl_common.inc.php index b7acbc0987..53d9d9a0a0 100644 --- a/libraries/tbl_common.inc.php +++ b/libraries/tbl_common.inc.php @@ -23,7 +23,7 @@ $db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($db); * Set parameters for links * @deprecated */ -$url_query = PMA_URL_getCommon($db, $table); +$url_query = PMA_URL_getCommon(array('db' => $db, 'table' => $table)); /** * Set parameters for links @@ -36,7 +36,7 @@ $url_params['table'] = $table; * Defines the urls to return to in case of error in a sql statement */ $err_url_0 = $cfg['DefaultTabDatabase'] - . PMA_URL_getCommon(array('db' => $db,)); + . PMA_URL_getCommon(array('db' => $db)); $err_url = $cfg['DefaultTabTable'] . PMA_URL_getCommon($url_params); diff --git a/libraries/tracking.lib.php b/libraries/tracking.lib.php index 1af6c4063a..2d624baa36 100644 --- a/libraries/tracking.lib.php +++ b/libraries/tracking.lib.php @@ -673,7 +673,7 @@ function PMA_getHtmlForDataManipulationStatement($entry, $filter_users, $html .= '' . htmlspecialchars($entry['username']) . ''; $html .= '' . $statement . ''; - $html .= '', $html diff --git a/test/classes/navigation/PMA_Node_DatabaseChild_test.php b/test/classes/navigation/PMA_Node_DatabaseChild_test.php index f0e1e57756..0b643d1e33 100644 --- a/test/classes/navigation/PMA_Node_DatabaseChild_test.php +++ b/test/classes/navigation/PMA_Node_DatabaseChild_test.php @@ -82,7 +82,7 @@ class Node_DatabaseChildTest extends PHPUnit_Framework_TestCase $html ); $this->assertContains( - '', $html diff --git a/test/libraries/PMA_generateCommonUrl_test.php b/test/libraries/PMA_generateCommonUrl_test.php index 23929691c4..7fac2f9574 100644 --- a/test/libraries/PMA_generateCommonUrl_test.php +++ b/test/libraries/PMA_generateCommonUrl_test.php @@ -33,11 +33,11 @@ class PMA_GenerateCommonURL_Test extends PHPUnit_Framework_TestCase } /** - * Test for PMA_URL_getCommon with old style + * Test for PMA_URL_getCommon for DB only * * @return void */ - public function testOldStyle() + public function testDbOnly() { $GLOBALS['server'] = 'x'; $GLOBALS['collation_connection'] = 'x'; @@ -50,35 +50,10 @@ class PMA_GenerateCommonURL_Test extends PHPUnit_Framework_TestCase . 'token=token' ; - $expected = 'db=db' - . htmlentities($separator) . 'table=table' + $expected = '?db=db' . htmlentities($separator) . $expected; - $this->assertEquals($expected, PMA_URL_getCommon('db', 'table')); - } - - /** - * Test for PMA_URL_getCommon with old style for DB only - * - * @return void - */ - public function testOldStyleDbOnly() - { - $GLOBALS['server'] = 'x'; - $GLOBALS['collation_connection'] = 'x'; - $GLOBALS['cfg']['ServerDefault'] = 'y'; - - $separator = PMA_URL_getArgSeparator(); - $expected = 'server=x' . htmlentities($separator) - . 'lang=en' . htmlentities($separator) - . 'collation_connection=x' . htmlentities($separator) - . 'token=token' - ; - - $expected = 'db=db' - . htmlentities($separator) . $expected; - - $this->assertEquals($expected, PMA_URL_getCommon('db')); + $this->assertEquals($expected, PMA_URL_getCommon(array('db' => 'db'))); } /** @@ -107,11 +82,11 @@ class PMA_GenerateCommonURL_Test extends PHPUnit_Framework_TestCase } /** - * Test for PMA_URL_getCommon with old style and alternate separator + * Test for PMA_URL_getCommon with alternate divider * * @return void */ - public function testOldStyleWithAlternateSeparator() + public function testWithAlternateDivider() { $GLOBALS['server'] = 'x'; $GLOBALS['collation_connection'] = 'x'; @@ -124,30 +99,10 @@ class PMA_GenerateCommonURL_Test extends PHPUnit_Framework_TestCase . 'token=token' ; - $expected = 'db=db' . $separator . 'table=table' . $separator . $expected; - $this->assertEquals($expected, PMA_URL_getCommon('db', 'table', '&')); - } - - /** - * Test for PMA_URL_getCommon with old style and alternate separator for DB only - * - * @return void - */ - public function testOldStyleWithAlternateSeparatorDbOnly() - { - $GLOBALS['server'] = 'x'; - $GLOBALS['collation_connection'] = 'x'; - $GLOBALS['cfg']['ServerDefault'] = 'y'; - - $separator = PMA_URL_getArgSeparator(); - $expected = 'server=x' . $separator - . 'lang=en' . $separator - . 'collation_connection=x' . $separator - . 'token=token' - ; - - $expected = 'db=db' . $separator . $expected; - $this->assertEquals($expected, PMA_URL_getCommon('db', '', '&')); + $expected = '#ABC#db=db' . $separator . 'table=table' . $separator . $expected; + $this->assertEquals($expected, PMA_URL_getCommon( + array('db' => 'db', 'table' => 'table'), 'text', '#ABC#' + )); } /** @@ -162,7 +117,7 @@ class PMA_GenerateCommonURL_Test extends PHPUnit_Framework_TestCase $GLOBALS['cfg']['ServerDefault'] = 'y'; $separator = PMA_URL_getArgSeparator(); - $expected = 'server=x' . htmlentities($separator) + $expected = '?server=x' . htmlentities($separator) . 'lang=en' . htmlentities($separator) . 'collation_connection=x' . htmlentities($separator) . 'token=token'