diff --git a/ChangeLog b/ChangeLog index 43d318484..bc2ec78ad 100755 --- a/ChangeLog +++ b/ChangeLog @@ -85,8 +85,19 @@ $Id$ - patch #2999595, rfe #2998130 [interface] Cleanup navigation frame. - patch #3025161 [core] Prevent sending of unnecessary cookies, thanks to Piotr Przybylski - crackpl +- bug [password] Generate password only available if JS is enabled + (fixed for Privileges and Change password) +- [core] RecodingEngine now accepts none as valid option. ++ [core] Dropped AllowAnywhereRecoding configuration variable. +- rfe #3016457 [interface] Define tab order in SQL form to allow easier tab + navigation. ++ [code] Centralized format string expansion, @VARIABLES@ are recommended way + now. ++ [validator] SQL validator works also with SOAP PHP extension. +- [interface] Better formatting for SQL validator results. 3.3.6.0 (not yet released) +- bug #3031705 [core] Do not use CONCAT for DECIMAL fields. 3.3.5.0 (not yet released) - patch #2932113 [information_schema] Slow export when having lots of diff --git a/Documentation.html b/Documentation.html index 427f9647c..c35cfae27 100755 --- a/Documentation.html +++ b/Documentation.html @@ -340,7 +340,8 @@ rm -rf config # remove not needed directory FAQ 1.23).
If you already had this infrastructure and upgraded to MySQL 4.1.2 - or newer, please use ./scripts/upgrade_tables_mysql_4_1_2+.sql.
+ or newer, please use ./scripts/upgrade_tables_mysql_4_1_2+.sql + and then create new tables by importing ./scripts/create_tables.sql. You can use your phpMyAdmin to create the tables for you. Please be aware
that you may need special (administrator) privileges to create the database
@@ -1683,27 +1684,6 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE
expression. For example if you want only Czech and English, you should
set filter to '^(cs|en)'
.
-
@HTTP_HOST@
@SERVER@
@VERBOSE@
@VSERVER@
@DATABASE@
@TABLE@
@PHPMYADMIN@
To use it, you need a very recent version of PHP, 4.3.0 recommended, with +
+ To use SQL Validator, you need PHP with
XML,
PCRE and
PEAR support.
- On your system command line, run "pear install Net_Socket Net_URL
- HTTP_Request Mail_Mime Net_DIME SOAP" to get the necessary
- PEAR modules
- for usage.
- On a more recent pear version, I had problems with the state of Net_DIME
- being beta, so this single command
- "pear -d preferred_state=beta install -a SOAP" installed all the
- needed modules.
+ In addition you need a SOAP support, either as a PHP extension or as a PEAR SOAP
+ module.
+
+ To install PEAR SOAP module, run "pear install Net_Socket Net_URL + HTTP_Request Mail_Mime Net_DIME SOAP" to get the necessary PEAR modules for + usage. +
+ +If you use the Validator, you should be aware that any SQL statement you submit will be stored anonymously (database/table/column names, strings, numbers replaced with generic values). The Mimer SQL Validator itself, is © 2001 Upright Database Technology. - We utilize it as free SOAP service.
+ We utilize it as free SOAP service. +Click the first row of the range, hold the shift key and click the last row of the range. This works everywhere you see rows, for example in Browse mode or on the Structure page.
+
+ In all places where phpMyAdmin accepts format strings, you can use
+ @VARIABLE@
expansion and
+ strftime format strings. The
+ expanded variables depend on a context (eg. if you don't have chosen
+ table, you can not get table name), but following variables can be used:
+
@HTTP_HOST@
@SERVER@
@VERBOSE@
@VSERVER@
@DATABASE@
@TABLE@
@PHPMYADMIN@
' . sprintf(__('Total: %s match(es)'), + echo '
' . sprintf(_ngettext('Total: %s match', 'Total: %s matches', $num_search_result_total), $num_search_result_total) . '
' . "\n"; } } // end 1. diff --git a/db_sql.php b/db_sql.php index 500cf335b..9ee4ce4fa 100755 --- a/db_sql.php +++ b/db_sql.php @@ -2,7 +2,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * - * @version $Id$ * @package phpMyAdmin */ diff --git a/db_structure.php b/db_structure.php index 4c8e41f3d..8dc0ab859 100755 --- a/db_structure.php +++ b/db_structure.php @@ -2,7 +2,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * - * @version $Id$ * @package phpMyAdmin */ diff --git a/db_tracking.php b/db_tracking.php index 806da83be..8ecfb9691 100755 --- a/db_tracking.php +++ b/db_tracking.php @@ -1,7 +1,6 @@ setCookie('pma_server_filename_template', $filename_template); } - $filename = str_replace('__SERVER__', $GLOBALS['cfg']['Server']['host'], strftime($filename_template)); } elseif ($export_type == 'database') { if (isset($remember_template)) { $GLOBALS['PMA_Config']->setCookie('pma_db_filename_template', $filename_template); } - $filename = str_replace('__DB__', $db, str_replace('__SERVER__', $GLOBALS['cfg']['Server']['host'], strftime($filename_template))); } else { if (isset($remember_template)) { $GLOBALS['PMA_Config']->setCookie('pma_table_filename_template', $filename_template); } - $filename = str_replace('__TABLE__', $table, str_replace('__DB__', $db, str_replace('__SERVER__', $GLOBALS['cfg']['Server']['host'], strftime($filename_template)))); } + $filename = PMA_expandUserString($filename_template); // convert filename to iso-8859-1, it is safer - if (!(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] )) { - $filename = PMA_convert_string($charset, 'iso-8859-1', $filename); - } else { - $filename = PMA_convert_string($convcharset, 'iso-8859-1', $filename); - } + $filename = PMA_convert_string($charset, 'iso-8859-1', $filename); // Grab basic dump extension and mime type $filename .= '.' . $export_list[$type]['extension']; diff --git a/import.php b/import.php index 4d45a59d8..b12306419 100755 --- a/import.php +++ b/import.php @@ -4,7 +4,6 @@ * Core script for import, this is just the glue around all other stuff * * @uses PMA_Bookmark_getList() - * @version $Id$ * @package phpMyAdmin */ @@ -343,7 +342,7 @@ if ($import_file != 'none' && !$error) { //$_SESSION['Import_message'] = $message->getDisplay(); // Convert the file's charset if necessary -if ($cfg['AllowAnywhereRecoding'] && isset($charset_of_file)) { +if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE && isset($charset_of_file)) { if ($charset_of_file != $charset) { $charset_conversion = TRUE; } @@ -451,7 +450,7 @@ if (isset($my_die)) { if (! empty($last_query_with_results)) { // but we want to show intermediate results too $disp_query = $sql_query; - $disp_message = __('Your SQL query has been executed successfully'); + $disp_message = __('Your SQL query has been executed successfully'); $sql_query = $last_query_with_results; $go_sql = true; } diff --git a/import_status.php b/import_status.php index 4125eadea..d739009ee 100755 --- a/import_status.php +++ b/import_status.php @@ -2,7 +2,6 @@ /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * - * @version $Id$ * @package phpMyAdmin */ diff --git a/index.php b/index.php index d2d16fa78..3b16ec7d2 100755 --- a/index.php +++ b/index.php @@ -3,8 +3,6 @@ /** * forms frameset * - * @version $Id$ - * @uses __('phpMyAdmin is more friendly with a frames-capable browser.') * @uses $GLOBALS['cfg']['QueryHistoryDB'] * @uses $GLOBALS['cfg']['Server']['user'] * @uses $GLOBALS['cfg']['DefaultTabServer'] as src for the mainframe @@ -63,7 +61,7 @@ unset($cfgRelation); /** * pass variables to child pages */ -$drops = array('lang', 'server', 'convcharset', 'collation_connection', +$drops = array('lang', 'server', 'collation_connection', 'db', 'table'); foreach ($drops as $each_drop) { diff --git a/js/functions.js b/js/functions.js index aa88858bd..39dd73fa6 100755 --- a/js/functions.js +++ b/js/functions.js @@ -203,7 +203,7 @@ function confirmQuery(theForm1, sqlQuery1) * Displays a confirmation box before disabling the BLOB repository for a given database. * This function is called while clicking links * - * @param object the database + * @param object the database * * @return boolean whether to disable the repository or not */ @@ -291,10 +291,10 @@ function checkSqlQuery(theForm) // Global variable row_class is set to even var row_class = 'even'; -/** +/** * Generates a row dynamically in the differences table displaying -* the complete statistics of difference in table like number of -* rows to be updated, number of rows to be inserted, number of +* the complete statistics of difference in table like number of +* rows to be updated, number of rows to be inserted, number of * columns to be added, number of columns to be removed, etc. * * @param index index of matching table @@ -303,17 +303,17 @@ var row_class = 'even'; * @param remove_size number of columns to be removed * @param insert_index number of indexes to be inserted * @param remove_index number of indexes to be removed -* @param img_obj image object +* @param img_obj image object * @param table_name name of the table */ function showDetails(i, update_size, insert_size, remove_size, insert_index, remove_index, img_obj, table_name) -{ +{ // The path of the image is split to facilitate comparison - var relative_path = (img_obj.src).split("themes/"); - + var relative_path = (img_obj.src).split("themes/"); + // The image source is changed when the showDetails function is called. - if (relative_path[1] == 'original/img/new_data_hovered.jpg') { + if (relative_path[1] == 'original/img/new_data_hovered.jpg') { img_obj.src = "./themes/original/img/new_data_selected_hovered.jpg"; img_obj.alt = PMA_messages['strClickToUnselect']; //only for IE browser } else if (relative_path[1] == 'original/img/new_struct_hovered.jpg') { @@ -322,76 +322,76 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem } else if (relative_path[1] == 'original/img/new_struct_selected_hovered.jpg') { img_obj.src = "./themes/original/img/new_struct_hovered.jpg"; img_obj.alt = PMA_messages['strClickToSelect']; - } else if (relative_path[1] == 'original/img/new_data_selected_hovered.jpg') { + } else if (relative_path[1] == 'original/img/new_data_selected_hovered.jpg') { img_obj.src = "./themes/original/img/new_data_hovered.jpg"; img_obj.alt = PMA_messages['strClickToSelect']; - } - - var div = document.getElementById("list"); - var table = div.getElementsByTagName("table")[0]; + } + + var div = document.getElementById("list"); + var table = div.getElementsByTagName("table")[0]; var table_body = table.getElementsByTagName("tbody")[0]; - + //Global variable row_class is being used if (row_class == 'even') { row_class = 'odd'; } else { - row_class = 'even'; + row_class = 'even'; } - // If the red or green button against a table name is pressed then append a new row to show the details of differences of this table. - if ((relative_path[1] != 'original/img/new_struct_selected_hovered.jpg') && (relative_path[1] != 'original/img/new_data_selected_hovered.jpg')) { - - var newRow = document.createElement("tr"); + // If the red or green button against a table name is pressed then append a new row to show the details of differences of this table. + if ((relative_path[1] != 'original/img/new_struct_selected_hovered.jpg') && (relative_path[1] != 'original/img/new_data_selected_hovered.jpg')) { + + var newRow = document.createElement("tr"); newRow.setAttribute("class", row_class); - newRow.className = row_class; - // Id assigned to this row element is same as the index of this table name in the matching_tables/source_tables_uncommon array + newRow.className = row_class; + // Id assigned to this row element is same as the index of this table name in the matching_tables/source_tables_uncommon array newRow.setAttribute("id" , i); - + var table_name_cell = document.createElement("td"); table_name_cell.align = "center"; table_name_cell.innerHTML = table_name ; - + newRow.appendChild(table_name_cell); - + var create_table = document.createElement("td"); create_table.align = "center"; - + var add_cols = document.createElement("td"); add_cols.align = "center"; - + var remove_cols = document.createElement("td"); remove_cols.align = "center"; - + var alter_cols = document.createElement("td"); alter_cols.align = "center"; - + var add_index = document.createElement("td"); add_index.align = "center"; - + var delete_index = document.createElement("td"); delete_index.align = "center"; - + var update_rows = document.createElement("td"); update_rows.align = "center"; - + var insert_rows = document.createElement("td"); insert_rows.align = "center"; - + var tick_image = document.createElement("img"); - tick_image.src = "./themes/original/img/s_success.png"; + tick_image.src = "./themes/original/img/s_success.png"; if (update_size == '' && insert_size == '' && remove_size == '') { /** - This is the case when the table needs to be created in target database. + This is the case when the table needs to be created in target database. */ create_table.appendChild(tick_image); add_cols.innerHTML = "--"; - remove_cols.innerHTML = "--"; + remove_cols.innerHTML = "--"; alter_cols.innerHTML = "--"; delete_index.innerHTML = "--"; add_index.innerHTML = "--"; update_rows.innerHTML = "--"; insert_rows.innerHTML = "--"; - + newRow.appendChild(create_table); newRow.appendChild(add_cols); newRow.appendChild(remove_cols); @@ -400,43 +400,21 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem newRow.appendChild(add_index); newRow.appendChild(update_rows); newRow.appendChild(insert_rows); - + } else if (update_size == '' && remove_size == '') { /** - This is the case when data difference is displayed in the - table which is present in source but absent from target database + This is the case when data difference is displayed in the + table which is present in source but absent from target database */ create_table.innerHTML = "--"; add_cols.innerHTML = "--"; - remove_cols.innerHTML = "--"; + remove_cols.innerHTML = "--"; alter_cols.innerHTML = "--"; add_index.innerHTML = "--"; delete_index.innerHTML = "--"; update_rows.innerHTML = "--"; insert_rows.innerHTML = insert_size; - - newRow.appendChild(create_table); - newRow.appendChild(add_cols); - newRow.appendChild(remove_cols); - newRow.appendChild(alter_cols); - newRow.appendChild(delete_index); - newRow.appendChild(add_index); - newRow.appendChild(update_rows); - newRow.appendChild(insert_rows); - - } else if (remove_size == '') { - /** - This is the case when data difference between matching_tables is displayed. - */ - create_table.innerHTML = "--"; - add_cols.innerHTML = "--"; - remove_cols.innerHTML = "--"; - alter_cols.innerHTML = "--"; - add_index.innerHTML = "--"; - delete_index.innerHTML = "--"; - update_rows.innerHTML = update_size; - insert_rows.innerHTML = insert_size; - + newRow.appendChild(create_table); newRow.appendChild(add_cols); newRow.appendChild(remove_cols); @@ -445,41 +423,63 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem newRow.appendChild(add_index); newRow.appendChild(update_rows); newRow.appendChild(insert_rows); - + + } else if (remove_size == '') { + /** + This is the case when data difference between matching_tables is displayed. + */ + create_table.innerHTML = "--"; + add_cols.innerHTML = "--"; + remove_cols.innerHTML = "--"; + alter_cols.innerHTML = "--"; + add_index.innerHTML = "--"; + delete_index.innerHTML = "--"; + update_rows.innerHTML = update_size; + insert_rows.innerHTML = insert_size; + + newRow.appendChild(create_table); + newRow.appendChild(add_cols); + newRow.appendChild(remove_cols); + newRow.appendChild(alter_cols); + newRow.appendChild(delete_index); + newRow.appendChild(add_index); + newRow.appendChild(update_rows); + newRow.appendChild(insert_rows); + } else { /** This is the case when structure difference between matching_tables id displayed */ create_table.innerHTML = "--"; add_cols.innerHTML = insert_size; - remove_cols.innerHTML = remove_size; + remove_cols.innerHTML = remove_size; alter_cols.innerHTML = update_size; delete_index.innerHTML = remove_index; add_index.innerHTML = insert_index; update_rows.innerHTML = "--"; insert_rows.innerHTML = "--"; - + newRow.appendChild(create_table); newRow.appendChild(add_cols); newRow.appendChild(remove_cols); - newRow.appendChild(alter_cols); + newRow.appendChild(alter_cols); newRow.appendChild(delete_index); newRow.appendChild(add_index); newRow.appendChild(update_rows); newRow.appendChild(insert_rows); } table_body.appendChild(newRow); - + } else if ((relative_path[1] != 'original/img/new_struct_hovered.jpg') && (relative_path[1] != 'original/img/new_data_hovered.jpg')) { //The case when the row showing the details need to be removed from the table i.e. the difference button is deselected now. var table_rows = table_body.getElementsByTagName("tr"); var j; var index = 0; - for (j=0; j < table_rows.length; j++) - { - if (table_rows[j].id == i) { + for (j=0; j < table_rows.length; j++) + { + if (table_rows[j].id == i) { index = j; - table_rows[j].parentNode.removeChild(table_rows[j]); + table_rows[j].parentNode.removeChild(table_rows[j]); } } //The table row css is being adjusted. Class "odd" for odd rows and "even" for even rows should be maintained. @@ -490,11 +490,11 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem table_rows[index].setAttribute("class","odd"); // for Mozilla firefox table_rows[index].className = "odd"; // for IE browser } else { - table_rows[index].setAttribute("class","even"); // for Mozilla firefox - table_rows[index].className = "even"; // for IE browser + table_rows[index].setAttribute("class","even"); // for Mozilla firefox + table_rows[index].className = "even"; // for IE browser } - } - } + } + } } /** @@ -503,35 +503,35 @@ function showDetails(i, update_size, insert_size, remove_size, insert_index, rem * @param img_obj the image object whose source needs to be changed * */ - + function change_Image(img_obj) { - var relative_path = (img_obj.src).split("themes/"); - - if (relative_path[1] == 'original/img/new_data.jpg') { - img_obj.src = "./themes/original/img/new_data_hovered.jpg"; + var relative_path = (img_obj.src).split("themes/"); + + if (relative_path[1] == 'original/img/new_data.jpg') { + img_obj.src = "./themes/original/img/new_data_hovered.jpg"; } else if (relative_path[1] == 'original/img/new_struct.jpg') { img_obj.src = "./themes/original/img/new_struct_hovered.jpg"; } else if (relative_path[1] == 'original/img/new_struct_hovered.jpg') { img_obj.src = "./themes/original/img/new_struct.jpg"; - } else if (relative_path[1] == 'original/img/new_data_hovered.jpg') { - img_obj.src = "./themes/original/img/new_data.jpg"; - } else if (relative_path[1] == 'original/img/new_data_selected.jpg') { - img_obj.src = "./themes/original/img/new_data_selected_hovered.jpg"; - } else if(relative_path[1] == 'original/img/new_struct_selected.jpg') { - img_obj.src = "./themes/original/img/new_struct_selected_hovered.jpg"; - } else if (relative_path[1] == 'original/img/new_struct_selected_hovered.jpg') { - img_obj.src = "./themes/original/img/new_struct_selected.jpg"; - } else if (relative_path[1] == 'original/img/new_data_selected_hovered.jpg') { - img_obj.src = "./themes/original/img/new_data_selected.jpg"; + } else if (relative_path[1] == 'original/img/new_data_hovered.jpg') { + img_obj.src = "./themes/original/img/new_data.jpg"; + } else if (relative_path[1] == 'original/img/new_data_selected.jpg') { + img_obj.src = "./themes/original/img/new_data_selected_hovered.jpg"; + } else if(relative_path[1] == 'original/img/new_struct_selected.jpg') { + img_obj.src = "./themes/original/img/new_struct_selected_hovered.jpg"; + } else if (relative_path[1] == 'original/img/new_struct_selected_hovered.jpg') { + img_obj.src = "./themes/original/img/new_struct_selected.jpg"; + } else if (relative_path[1] == 'original/img/new_data_selected_hovered.jpg') { + img_obj.src = "./themes/original/img/new_data_selected.jpg"; } } /** - * Generates the URL containing the list of selected table ids for synchronization and - * a variable checked for confirmation of deleting previous rows from target tables + * Generates the URL containing the list of selected table ids for synchronization and + * a variable checked for confirmation of deleting previous rows from target tables * - * @param token the token generated for each PMA form + * @param token the token generated for each PMA form * */ @@ -545,15 +545,15 @@ function ApplySelectedChanges(token) var x = table_rows.length; var i; /** - Append the token at the beginning of the query string followed by - Table_ids that shows that "Apply Selected Changes" button is pressed + Append the token at the beginning of the query string followed by + Table_ids that shows that "Apply Selected Changes" button is pressed */ var append_string = "?token="+token+"&Table_ids="+1; for(i=0; i';
+ if (!empty($GLOBALS['validatequery'])) {
+ echo '';
+ } else {
+ echo '';
+ }
if ($query_too_big) {
echo $shortened_query_base;
} else {
@@ -1270,7 +1271,11 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
if (! empty($GLOBALS['show_as_php'])) {
echo '";';
}
- echo '
';
+ if (!empty($GLOBALS['validatequery'])) {
+ echo '';
+ } else {
+ echo '
';
+ }
echo '