diff --git a/ChangeLog b/ChangeLog index 3143e5729..80e905c98 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-01-08 Michal Cihar + * libraries/url_generation.lib.php3, libraries/common.lib.php3: New URL + and hidden input generating stuff. + * almost all php3 files: Use new URL and hidden input generation stuff. + 2003-01-08 Alexander M. Turek * lang/english-*.inc.php3: Fixed a typo. diff --git a/db_create.php3 b/db_create.php3 index 82fd5132f..6cd2d4605 100755 --- a/db_create.php3 +++ b/db_create.php3 @@ -14,11 +14,7 @@ require('./header.inc.php3'); /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'main.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server; - +$err_url = 'main.php3?' . PMA_generate_common_url(); /** * Ensures the db name is valid diff --git a/db_datadict.php3 b/db_datadict.php3 index 5e14fde8c..9e971c3af 100644 --- a/db_datadict.php3 +++ b/db_datadict.php3 @@ -21,18 +21,9 @@ require('./libraries/relation.lib.php3'); * Defines the url to return to in case of error in a sql statement */ if (isset($table)) { - $err_url = 'tbl_properties.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); + $err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table); } else { - $err_url = 'db_details.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db); + $err_url = 'db_details.php3?' . PMA_generate_common_url($db); } @@ -299,4 +290,4 @@ function printPage() echo '

 ' . "\n"; require('./footer.inc.php3'); -?> \ No newline at end of file +?> diff --git a/db_details.php3 b/db_details.php3 index fa2e9cf32..1ddd614d3 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -57,10 +57,7 @@ $auto_sel = ($cfg['TextareaAutoSelect'])
onsubmit="return checkSqlQuery(this)"> - - - - + diff --git a/db_details_common.php3 b/db_details_common.php3 index 1c04d9bae..6c32d077c 100644 --- a/db_details_common.php3 +++ b/db_details_common.php3 @@ -19,15 +19,8 @@ if (!defined('PMA_BOOKMARK_LIB_INCLUDED')) { /** * Defines the urls to return to in case of error in a sql statement */ -$err_url_0 = 'main.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server; -$err_url = $cfg['DefaultTabDatabase'] - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db); +$err_url_0 = 'main.php3?' . PMA_generate_common_url(); +$err_url = $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db); /** @@ -40,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?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . (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) @@ -54,7 +47,7 @@ if (!isset($message)) { ?> diff --git a/db_details_export.php3 b/db_details_export.php3 index e41fda65a..fd6767ec4 100644 --- a/db_details_export.php3 +++ b/db_details_export.php3 @@ -68,11 +68,8 @@ echo "\n"; 1) { - $checkall_url = 'db_details_export.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) + $checkall_url = 'db_details_export.php3?' + . PMA_generate_common_url($db) . '&goto=db_details_export.php3'; ?>
@@ -191,9 +188,7 @@ if (function_exists('PMA_set_enc_form')) { - - - +
diff --git a/db_details_importdocsql.php3 b/db_details_importdocsql.php3 index a34970079..1180d1e8a 100644 --- a/db_details_importdocsql.php3 +++ b/db_details_importdocsql.php3 @@ -123,9 +123,7 @@ if (empty($DOCUMENT_ROOT)) { ?>
- - - + Please enter absolute path on webserver to docSQL Directory: diff --git a/db_details_qbe.php3 b/db_details_qbe.php3 index 48cf9f8ed..610908802 100755 --- a/db_details_qbe.php3 +++ b/db_details_qbe.php3 @@ -685,9 +685,7 @@ $w--; - - - + diff --git a/db_details_structure.php3 b/db_details_structure.php3 index cebbcf93b..72c984db1 100644 --- a/db_details_structure.php3 +++ b/db_details_structure.php3 @@ -50,10 +50,7 @@ if ($num_tables == 0) { else if (PMA_MYSQL_INT_VERSION >= 32303) { ?> - - - - + @@ -270,11 +267,7 @@ else if (PMA_MYSQL_INT_VERSION >= 32303) { @@ -326,10 +319,7 @@ else { echo "\n"; ?> - - - - +
@@ -385,11 +375,7 @@ else { echo "\n"; // Check all tables url - $checkall_url = 'db_details_structure.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db); + $checkall_url = 'db_details_structure.php3?' . PMA_generate_common_url($db); ?>
@@ -448,10 +434,7 @@ if ($num_tables > 0) {
  • - - - - + ' . "\n"; echo ' ' . $strName . ' : ' . "\n"; @@ -496,10 +479,7 @@ if ($cfgRelation['pdfwork'] && $num_tables > 0) { ?>
  • - - - - +  :
      - - - + diff --git a/db_stats.php3 b/db_stats.php3 index d1155f968..292fbb554 100644 --- a/db_stats.php3 +++ b/db_stats.php3 @@ -26,10 +26,7 @@ if (!@PMA_mysql_query('USE mysql', $userlink)) { */ if ((!empty($submit_mult) && isset($selected_db)) || isset($mult_btn)) { - $err_url = 'db_stats.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server; + $err_url = 'db_stats.php3?' . PMA_generate_common_url(); $action = 'db_stats.php3'; $show_query = '1'; include('./mult_submits.inc.php3'); @@ -83,7 +80,7 @@ function PMA_dbCmp($a, $b) if ($server > 0) { // Get the valid databases list $num_dbs = count($dblist); - $dbs = @mysql_list_dbs() or PMA_mysqlDie('', 'mysql_list_dbs()', '', 'main.php3?lang' . $lang . '&server=' . $server); + $dbs = @mysql_list_dbs() or PMA_mysqlDie('', 'mysql_list_dbs()', '', 'main.php3?' . PMA_generate_common_url()); if ($dbs) { while ($a_db = PMA_mysql_fetch_object($dbs)) { if (!$num_dbs) { @@ -144,7 +141,7 @@ if ($server > 0) { */ if ($num_dbs > 0) { // Defines the urls used to sort the table - $common_url = 'db_stats.php3?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server; + $common_url = 'db_stats.php3?' . PMA_generate_common_url(); if (empty($sort_by)) { $sort_by = 'db_name'; $sort_order = 'asc'; @@ -185,9 +182,7 @@ if ($num_dbs > 0) { } ?> - - - +
    @@ -271,10 +266,8 @@ if ($num_dbs > 0) { reset($dbs_array); // Check/unchek all databases url - $checkall_url = 'db_stats.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server + $checkall_url = 'db_stats.php3?' + . PMA_generate_common_url() . (empty($sort_by) ? '' : '&sort_by=' . $sort_by) . (empty($sort_order) ? '' : '&sort_order=' . $sort_order); $do_check = (empty($checkall)) @@ -294,7 +287,7 @@ if ($num_dbs > 0) { echo ' ' . "\n"; - echo ' ' . "\n"; + echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; echo ' ' . "\n"; diff --git a/header.inc.php3 b/header.inc.php3 index adbaf27cc..836cb2a85 100755 --- a/header.inc.php3 +++ b/header.inc.php3 @@ -249,9 +249,7 @@ if (!defined('PMA_DISPLAY_HEADING')) { define('PMA_DISPLAY_HEADING', 1); } if (PMA_DISPLAY_HEADING) { - $header_url_qry = '?lang=' . urlencode($GLOBALS['lang']) - . '&convcharset=' . $GLOBALS['convcharset'] - . '&server=' . $GLOBALS['server']; + $header_url_qry = '?' . PMA_generate_common_url(); echo '

    ' . "\n"; $server_info = (!empty($cfg['Server']['verbose']) ? $cfg['Server']['verbose'] diff --git a/index.php3 b/index.php3 index 8fef385cb..40dbd31a3 100755 --- a/index.php3 +++ b/index.php3 @@ -38,10 +38,7 @@ if (isset($lightm_db)) { $db = urldecode($lightm_db); unset($lightm_db); } -$url_query = 'lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . (empty($db) ? '' : '&db=' . urlencode($db)); +$url_query = PMA_generate_common_url(isset($db) ? $db : ''); header('Content-Type: text/html; charset=' . $GLOBALS['charset']); ?> diff --git a/ldi_table.php3 b/ldi_table.php3 index bf27af4a7..1d236fc25 100755 --- a/ldi_table.php3 +++ b/ldi_table.php3 @@ -102,11 +102,7 @@ if (function_exists('PMA_set_enc_form')) {

    ' . "\n"; echo '   ' . "\n"; echo '  ' . htmlspecialchars($db_name) . '  ' . htmlspecialchars($db_name) . '  ' . $dbs_array[$db_name][0] . '  ' . $data_size . ' ' . $data_unit . '  ' . $idx_size . ' ' . $idx_unit . ' 
    - - - - - + diff --git a/left.php3 b/left.php3 index 29a33ac6a..eabc4aac8 100755 --- a/left.php3 +++ b/left.php3 @@ -179,7 +179,7 @@ echo "\n"; ?>
    - +
    @@ -198,9 +198,7 @@ if ($num_dbs > 1) { // Light mode -> beginning of the select combo for databases if ($cfg['LeftFrameLight']) { echo ' ' . "\n"; - echo ' ' . "\n"; - echo ' ' . "\n"; - echo ' ' . "\n"; + echo PMA_generate_common_hidden_inputs(); echo '

    - - - + diff --git a/mult_submits.inc.php3 b/mult_submits.inc.php3 index 22bf25349..494a27188 100644 --- a/mult_submits.inc.php3 +++ b/mult_submits.inc.php3 @@ -107,16 +107,12 @@ if (!empty($submit_mult) && !empty($what)) { echo '' . $full_query . ' ?
    ' . "\n"; ?> - - - ' . "\n"; + echo PMA_generate_common_hidden_inputs($db); } else if (strpos(' ' . $action, 'tbl_properties') == 1) { - echo ' ' . "\n"; - echo ' ' . "\n"; + echo PMA_generate_common_hidden_inputs($db,$table); } for ($i = 0; $i < $selected_cnt; $i++) { echo ' ' . "\n"; diff --git a/pdf_pages.php3 b/pdf_pages.php3 index be61c7669..ae8658247 100755 --- a/pdf_pages.php3 +++ b/pdf_pages.php3 @@ -120,11 +120,7 @@ if ($cfgRelation['pdfwork']) { ?> - - - - - + - - - - + @@ -168,11 +160,7 @@ if ($cfgRelation['pdfwork']) {

    - - - - - + @@ -261,10 +249,7 @@ if ($cfgRelation['pdfwork']) { if (isset($do) && ($do == 'edcoord' || $do == 'choosepage')) { ?> - - - - +  :
    @@ -294,4 +279,4 @@ if ($cfgRelation['pdfwork']) { */ echo "\n"; require('./footer.inc.php3'); -?> \ No newline at end of file +?> diff --git a/pdf_schema.php3 b/pdf_schema.php3 index 66b904a1a..8fe29a139 100644 --- a/pdf_schema.php3 +++ b/pdf_schema.php3 @@ -296,11 +296,7 @@ class PMA_PDF extends FPDF echo ' ' . $error_message . "\n"; echo '

    ' . "\n"; - echo '' . $GLOBALS['strBack'] . ''; echo "\n"; @@ -1480,4 +1476,4 @@ $orientation = (isset($orientation) && $orientation == 'P') ? 'P' : 'L' PMA_mysql_select_db($db); $rt = new PMA_RT('auto', $pdf_page_number, $show_table_dimension, $show_color, $show_grid, $all_tab_same_wide, $orientation); -?> \ No newline at end of file +?> diff --git a/read_dump.php3 b/read_dump.php3 index cc67805ac..19162f8f4 100644 --- a/read_dump.php3 +++ b/read_dump.php3 @@ -237,10 +237,7 @@ if (!isset($goto) $goto = 'db_details.php3'; } $err_url = $goto - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) + . '?' . PMA_generate_common_url($db) . (($goto == 'tbl_properties.php3') ? '&table=' . urlencode($table) : ''); diff --git a/server_common.inc.php3 b/server_common.inc.php3 index c82198449..cc47cd307 100644 --- a/server_common.inc.php3 +++ b/server_common.inc.php3 @@ -25,9 +25,7 @@ if (isset($table)) { /** * Set parameters for links */ -$url_query = 'lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server; +$url_query = PMA_generate_common_url(); /** * Defines the urls to return to in case of error in a sql statement @@ -51,4 +49,4 @@ if (!empty($message)) { */ $is_superuser = @PMA_mysql_query('USE mysql', $userlink); -?> \ No newline at end of file +?> diff --git a/server_privileges.php3 b/server_privileges.php3 index ef34a69c1..3f9c8175f 100644 --- a/server_privileges.php3 +++ b/server_privileges.php3 @@ -590,11 +590,9 @@ if (empty($adduser)) { . ' Please run the script mysql_fix_privilege_tables that should be included in your MySQL server distribution to solve this problem!' . "\n" . '
    ' . "\n"; } - echo '' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . '
    ' . "\n" + echo '' . "\n"; + echo PMA_generate_common_hidden_inputs(); + echo '
    ' . "\n" . ' ' . "\n" . ' ' . "\n" . ' ' . "\n" @@ -688,11 +686,9 @@ if (empty($adduser)) { unset($res); echo '
      ' . "\n" . '
    • ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n"; + . ' ' . "\n"; + echo PMA_generate_common_hidden_inputs(); + echo ' ' . "\n"; if ($hostname != '%') { echo ' ' . "\n"; } @@ -803,11 +799,9 @@ if (empty($adduser)) { unset($row); echo '
    ' . "\n" . '
     ' . $strUser . ' 
    ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n"; + . ' ' . "\n"; + echo PMA_generate_common_hidden_inputs(); + echo ' ' . "\n"; if ($hostname != '%') { echo ' ' . "\n"; } @@ -828,11 +822,9 @@ if (empty($adduser)) { } if (empty($dbname)) { echo '
  • ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n"; + . ' ' . "\n"; + echo PMA_generate_common_hidden_inputs(); + echo ' ' . "\n"; if ($hostname != '%') { echo ' ' . "\n"; } @@ -870,11 +862,9 @@ if (empty($adduser)) { echo '

    ' . "\n" . ' ' . $strAddUser . "\n" . '

    ' . "\n" - . '' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" - . ' ' . "\n" + . '' . "\n"; + echo PMA_generate_common_hidden_inputs(); + echo '
    ' . "\n" . ' ' . "\n" . '
    ' . "\n" . ' ' . $strLoginInformation . "\n" @@ -974,4 +964,4 @@ if (empty($adduser)) { */ require('./footer.inc.php3'); -?> \ No newline at end of file +?> diff --git a/sql.php3 b/sql.php3 index fc649d16c..6427dcf09 100755 --- a/sql.php3 +++ b/sql.php3 @@ -27,10 +27,7 @@ if (empty($goto)) { } // end if if (!isset($err_url)) { $err_url = (!empty($back) ? $back : $goto) - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . (isset($db) ? '&db=' . urlencode($db) : '') + . '?' . PMA_generate_common_url(isset($db) ? $db : '') . ((strpos(' ' . $goto, 'db_details') != 1 && isset($table)) ? '&table=' . urlencode($table) : ''); } // end if @@ -123,12 +120,8 @@ if ($is_select) { * Sets or modifies the $goto variable if required */ if ($goto == 'sql.php3') { - $goto = 'sql.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + $goto = 'sql.php3?' + . PMA_generate_common_url($db, $table) . '&pos=' . $pos . '&sql_query=' . urlencode($sql_query); } // end if @@ -182,11 +175,7 @@ if ($do_confirm) { echo '' . htmlspecialchars($stripped_sql_query) . ' ?
    ' . "\n"; ?> - - - - - + @@ -508,23 +497,16 @@ else { // Displays "Insert a new row" link if required if ($disp_mode[6] == '1') { - $lnk_goto = 'sql.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + $lnk_goto = 'sql.php3?' + . PMA_generate_common_url($db, $table) . '&pos=' . $pos . '&session_max_rows=' . $session_max_rows . '&disp_direction=' . $disp_direction . '&repeat_cells=' . $repeat_cells . '&dontlimitchars=' . $dontlimitchars . '&sql_query=' . urlencode($sql_query); - $url_query = '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + $url_query = '?' + . PMA_generate_common_url($db, $table) . '&pos=' . $pos . '&session_max_rows=' . $session_max_rows . '&disp_direction=' . $disp_direction @@ -543,11 +525,8 @@ else { // Displays "printable view" link if required if ($disp_mode[9] == '1') { - $url_query = '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + $url_query = '?' + . PMA_generate_common_url($db, $table) . '&pos=' . $pos . '&session_max_rows=' . $session_max_rows . '&disp_direction=' . $disp_direction @@ -568,12 +547,8 @@ else { && !empty($sql_query)) { echo "\n"; - $goto = 'sql.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + $goto = 'sql.php3?' + . PMA_generate_common_url($db, $table) . '&pos=' . $pos . '&session_max_rows=' . $session_max_rows . '&disp_direction=' . $disp_direction @@ -592,7 +567,7 @@ else { ?>

     : - + diff --git a/tbl_addfield.php3 b/tbl_addfield.php3 index 3d8c8e7ec..2b51f6d20 100755 --- a/tbl_addfield.php3 +++ b/tbl_addfield.php3 @@ -16,12 +16,7 @@ require('./header.inc.php3'); /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'tbl_properties.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); +$err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table); /** diff --git a/tbl_alter.php3 b/tbl_alter.php3 index 332483e1a..5f839555c 100755 --- a/tbl_alter.php3 +++ b/tbl_alter.php3 @@ -18,12 +18,7 @@ if (!isset($submit_mult)) { /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'tbl_properties_structure.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); +$err_url = 'tbl_properties_structure.php3?' . PMA_generate_common_url($db, $table); /** diff --git a/tbl_change.php3 b/tbl_change.php3 index 808cb5751..5e39b91ac 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -18,12 +18,8 @@ require('./libraries/relation.lib.php3'); // foreign keys if (!empty($message)) { if (isset($goto)) { $goto_cpy = $goto; - $goto = 'tbl_properties.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + $goto = 'tbl_properties.php3?' + . PMA_generate_common_url($db, $table) . '&$show_query=1' . '&sql_query=' . urlencode($disp_query); } else { @@ -66,11 +62,8 @@ if (!isset($goto)) { if (!ereg('^(db_details|tbl_properties|tbl_select)', $goto)) { $err_url = $goto; } else { - $err_url = $goto - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) + $err_url = $goto . '?' + . PMA_generate_common_url($db) //. (($goto == 'tbl_properties.php3') ? '&table=' . urlencode($table) : ''); . ((ereg('^(tbl_properties|tbl_select)', $goto)) ? '&table=' . urlencode($table) : ''); } @@ -85,11 +78,7 @@ require('./libraries/db_table_exists.lib.php3'); /** * Sets parameters for links and displays top menu */ -$url_query = 'lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) +$url_query = PMA_generate_common_url($db, $table) . '&goto=tbl_properties.php3'; require('./tbl_properties_table_info.php3'); @@ -110,12 +99,8 @@ if (isset($primary_key)) { unset($row); unset($primary_key); $goto_cpy = $goto; - $goto = 'tbl_properties.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + $goto = 'tbl_properties.php3?' + . PMA_generate_common_url($db, $table) . '&$show_query=1' . '&sql_query=' . urlencode($local_query); if (isset($sql_query)) { @@ -159,11 +144,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) - - - - - + diff --git a/tbl_create.php3 b/tbl_create.php3 index 341b92edd..93946da80 100755 --- a/tbl_create.php3 +++ b/tbl_create.php3 @@ -16,12 +16,7 @@ require('./header.inc.php3'); /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'tbl_properties.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); +$err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table); /** diff --git a/tbl_dump.php3 b/tbl_dump.php3 index dab607659..f39d2f9b7 100755 --- a/tbl_dump.php3 +++ b/tbl_dump.php3 @@ -67,12 +67,7 @@ require('./libraries/zip.lib.php3'); /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'tbl_properties.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . (isset($table) ? '&table=' . urlencode($table) : ''); +$err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, isset($table) ? $table : ''); /** diff --git a/tbl_indexes.php3 b/tbl_indexes.php3 index ce948ca23..d590f11cf 100644 --- a/tbl_indexes.php3 +++ b/tbl_indexes.php3 @@ -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?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . (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'] . '?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server .'&db=' . urlencode($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); @@ -65,11 +65,7 @@ if (!defined('PMA_IDX_INCLUDED')) { * Gets fields and indexes informations */ if (defined('PMA_IDX_INCLUDED')) { - $err_url_0 = 'db_details.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db); + $err_url_0 = 'db_details.php3?' . PMA_generate_common_url($db); } // Gets table keys and store them in arrays @@ -167,12 +163,7 @@ if (get_magic_quotes_gpc()) { if (!defined('PMA_IDX_INCLUDED') && (isset($index) && isset($do_save_data))) { - $err_url = 'tbl_indexes.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); + $err_url = 'tbl_indexes.php3?' . PMA_generate_common_url($db, $table); if (empty($old_index)) { $err_url .= '&create_index=1&idx_num_fields=' . $idx_num_fields; } else { @@ -306,11 +297,7 @@ else if (!defined('PMA_IDX_INCLUDED') - - - - - + '; @@ -424,11 +411,7 @@ else if (!defined('PMA_IDX_INCLUDED') ?> - - - - - +
     ' . "\n"; require('./footer.inc.php3'); -?> \ No newline at end of file +?> diff --git a/tbl_properties.inc.php3 b/tbl_properties.inc.php3 index 0403f2dd7..61550f570 100755 --- a/tbl_properties.inc.php3 +++ b/tbl_properties.inc.php3 @@ -5,12 +5,8 @@ ?> - - - - - diff --git a/tbl_properties_common.php3 b/tbl_properties_common.php3 index 5a4ce641a..790221042 100755 --- a/tbl_properties_common.php3 +++ b/tbl_properties_common.php3 @@ -20,17 +20,8 @@ if (!defined('PMA_BOOKMARK_LIB_INCLUDED')) { /** * Defines the urls to return to in case of error in a sql statement */ -$err_url_0 = $cfg['DefaultTabDatabase'] - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db); -$err_url = $cfg['DefaultTabTable'] - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); +$err_url_0 = $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db); +$err_url = $cfg['DefaultTabTable'] . '?' . PMA_generate_common_url($db, $table); /** @@ -53,10 +44,6 @@ if (!isset($message)) { /** * Set parameters for links */ -$url_query = 'lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); +$url_query = PMA_generate_common_url($db, $table); ?> diff --git a/tbl_properties_export.php3 b/tbl_properties_export.php3 index f52d0d50a..db85d3759 100755 --- a/tbl_properties_export.php3 +++ b/tbl_properties_export.php3 @@ -17,11 +17,7 @@ require('./tbl_properties_table_info.php3');

    - - - - - + diff --git a/tbl_properties_operations.php3 b/tbl_properties_operations.php3 index 4976bf2c5..92449c0ef 100755 --- a/tbl_properties_operations.php3 +++ b/tbl_properties_operations.php3 @@ -58,11 +58,7 @@ if (PMA_MYSQL_INT_VERSION >= 32334) {
  • - - - - - +  : - - - - +  :   @@ -109,11 +101,7 @@ echo "\n";
  • - - - - - + @@ -128,7 +116,7 @@ echo "\n"; ' . htmlspecialchars($dblist[$i]) . ''; @@ -152,11 +140,7 @@ for ($i = 0; $i < $num_dbs; $i++) {
    - - - - - + diff --git a/tbl_properties_options.php3 b/tbl_properties_options.php3 index 193a4300f..24d453f0e 100755 --- a/tbl_properties_options.php3 +++ b/tbl_properties_options.php3 @@ -58,10 +58,7 @@ if (PMA_MYSQL_INT_VERSION >= 32322) {
  • - - - - +  :      @@ -108,10 +105,7 @@ if (PMA_MYSQL_INT_VERSION >= 32322) { ?>
  • - - - - +  : 
  • - - - - + diff --git a/tbl_properties_structure.php3 b/tbl_properties_structure.php3 index 42b6371f5..afbb507df 100755 --- a/tbl_properties_structure.php3 +++ b/tbl_properties_structure.php3 @@ -57,10 +57,7 @@ $fields_cnt = mysql_num_rows($fields_rs); - - - - +
    @@ -503,10 +500,7 @@ echo "\n";
  • - - - - +  : - - - - - + diff --git a/tbl_relation.php3 b/tbl_relation.php3 index 43feb956d..29f1782ac 100644 --- a/tbl_relation.php3 +++ b/tbl_relation.php3 @@ -214,10 +214,7 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) { ?> - - - - +
  • @@ -289,10 +286,7 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) { echo "\n"; ?> - - - - +

    @@ -326,10 +320,7 @@ if ($col_rs && mysql_num_rows($col_rs) > 0) { echo "\n"; ?> - - - - +
    diff --git a/tbl_rename.php3 b/tbl_rename.php3 index e2ab1fc0a..07325999b 100755 --- a/tbl_rename.php3 +++ b/tbl_rename.php3 @@ -14,12 +14,7 @@ require('./libraries/common.lib.php3'); /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'tbl_properties.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); +$err_url = 'tbl_properties.php3?' . PMA_generate_common_url($db, $table); /** diff --git a/tbl_replace.php3 b/tbl_replace.php3 index 5d66fbf79..f850af2ee 100755 --- a/tbl_replace.php3 +++ b/tbl_replace.php3 @@ -22,12 +22,8 @@ if (!isset($dontlimitchars)) { } $is_gotofile = FALSE; if (isset($after_insert) && $after_insert == 'new_insert') { - $goto = 'tbl_change.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + $goto = 'tbl_change.php3?' + . PMA_generate_common_url($db, $table) . '&goto=' . urlencode($goto) . '&pos=' . $pos . '&session_max_rows=' . $session_max_rows @@ -37,11 +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?' - . 'lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table) + . PMA_generate_common_url($db, $table) . '&pos=' . $pos . '&session_max_rows=' . $session_max_rows . '&disp_direction=' . $disp_direction diff --git a/tbl_select.php3 b/tbl_select.php3 index db03e3876..d84a3dd73 100755 --- a/tbl_select.php3 +++ b/tbl_select.php3 @@ -33,12 +33,7 @@ if (!isset($param) || $param[0] == '') { $goto = $cfg['DefaultTabTable']; } // Defines the url to return to in case of error in the next sql statement - $err_url = $goto - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=' . urlencode($db) - . '&table=' . urlencode($table); + $err_url = $goto . '?' . PMA_generate_common_url($db, $table); // Gets the list and number of fields $local_query = 'SHOW FIELDS FROM ' . PMA_backquote($table) . ' FROM ' . PMA_backquote($db); @@ -74,11 +69,7 @@ if (!isset($param) || $param[0] == '') { $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE); ?> - - - - - +       diff --git a/user_details.php3 b/user_details.php3 index f5bd86bec..2e0b6f3c3 100644 --- a/user_details.php3 +++ b/user_details.php3 @@ -13,13 +13,7 @@ require('./libraries/common.lib.php3'); /** * Defines the url to return to in case of error in a sql statement */ -$err_url = 'user_details.php3' - . '?lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server - . '&db=mysql' - . '&table=user'; - +$err_url = 'user_details.php3?' . PMA_generate_common_url('mysql', 'user'); /** * Displays the table of grants for an user @@ -72,7 +66,7 @@ function PMA_tableGrants(&$host_db_result, $dbcheck = FALSE) { echo "\n"; // 2. Table body - $url_query = 'lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server . '&db=mysql&table=user'; + $url_query = PMA_generate_common_url('mysql', 'user'); while ($row = (is_array($host_db_result) ? $host_db_result : PMA_mysql_fetch_array($host_db_result))) { $local_query = 'SHOW GRANTS FOR \'' . $row['User'] . '\'@\'' . $row['Host'] . '\''; @@ -346,7 +340,7 @@ function PMA_normalOperations()
  • - +  
    @@ -371,9 +365,7 @@ function PMA_normalOperations() } // end if ?> - - - + @@ -443,9 +435,7 @@ function PMA_normalOperations() echo "\n"; PMA_tablePrivileges('addUserForm'); ?> - - - +
  • @@ -485,16 +475,14 @@ function PMA_grantOperations($grants)
  • - - - + " /> " /> @@ -686,7 +674,7 @@ function PMA_editOperations($host, $user)
  • @@ -751,9 +739,7 @@ function PMA_editOperations($host, $user)
    - - - + " /> " /> @@ -767,9 +753,7 @@ function PMA_editOperations($host, $user) PMA_tablePrivileges('privForm', $row); echo "\n"; ?> - - - + " /> " /> @@ -879,17 +863,17 @@ function PMA_tableUsers($host = FALSE, $user = FALSE) $strPriv = '' . $GLOBALS['strNoPrivileges'] . ''; } - $query = 'lang=' . $lang . '&server=' . $server . '&db=mysql&table=user&convcharset=' . $convcharset; + $query = PMA_generate_common_url('mysql', 'user'); if (!$user) { - $edit_url = 'user_details.php3' - . '?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server + $edit_url = 'user_details.php3?' + . PMA_generate_common_url() . '&edit=1&host=' . urlencode($row['Host']) . '&pma_user=' . urlencode($row['User']); } - $delete_url = 'user_details.php3' - . '?' . $query + $delete_url = 'user_details.php3?' + . $query . '&delete=1&confirm=1&delete_host=' . urlencode($row['Host']) . '&delete_user=' . urlencode($row['User']); - $check_url = 'user_details.php3' - . '?lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server + $check_url = 'user_details.php3?' + . PMA_generate_common_url() . '&grants=1&host=' . urlencode($row['Host']) . '&pma_user=' . urlencode($row['User']); ?> @@ -972,11 +956,7 @@ function PMA_confirm($the_host, $the_user) { echo 'DELETE FROM mysql.user WHERE Host = \'' . $the_host . '\' AND User = \'' . $the_user . '\'' . '
    ' . "\n"; ?> - - - - - + " /> " /> @@ -1501,7 +1481,7 @@ else if (isset($check) && $check) { ?> diff --git a/user_password.php3 b/user_password.php3 index ffd0876db..2d1cf7b0b 100644 --- a/user_password.php3 +++ b/user_password.php3 @@ -50,9 +50,7 @@ if (isset($nopass)) { } // Defines the url to return to in case of error in the sql statement - $common_url_query = 'lang=' . $lang - . '&convcharset=' . $convcharset - . '&server=' . $server; + $common_url_query = PMA_generate_common_url(); $err_url = 'user_password.php3?' . $common_url_query; @@ -107,8 +105,7 @@ $chg_evt_handler = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER >= 5) // Displays the form ?> - - +