The branch, master has been updated via 57265808b8e639bb06506851a74e3474521ccb70 (commit) via 89f03ef81b9705a15e3a173a316130e2acf9c4bb (commit) via 219f5a4fb913a5f748a0d871e751a0609dea5c17 (commit) via a480379baeddef4a7af43adc1504760179188164 (commit) from f60afa01e40fe259a1745adad26dda3bcef81ac0 (commit)
- Log ----------------------------------------------------------------- commit 57265808b8e639bb06506851a74e3474521ccb70 Author: Michal Čihař michal@cihar.com Date: Thu Dec 2 17:20:09 2010 +0100
Do not fail if transformations are not enabled for this table, but request asks to enable them.
commit 89f03ef81b9705a15e3a173a316130e2acf9c4bb Author: Michal Čihař michal@cihar.com Date: Thu Dec 2 17:14:59 2010 +0100
bug #3123433 [interface] Avoid double escaping of MySQL errors.
The PMA_DBI_getError function already does escaping, so there is no need to escape that string again on displaying.
commit 219f5a4fb913a5f748a0d871e751a0609dea5c17 Author: Michal Čihař michal@cihar.com Date: Thu Dec 2 17:06:05 2010 +0100
Whitespace cleanup.
commit a480379baeddef4a7af43adc1504760179188164 Author: Michal Čihař michal@cihar.com Date: Thu Dec 2 17:05:57 2010 +0100
Remove not used variable.
-----------------------------------------------------------------------
Summary of changes: ChangeLog | 1 + libraries/common.lib.php | 9 +++------ sql.php | 24 ++++++++++++++---------- 3 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 2c791ac..5a44159 100644 --- a/ChangeLog +++ b/ChangeLog @@ -123,6 +123,7 @@ - bug #3115519 [interface] Prevent long queries from being shown in confirmation popup - patch #3112792 [navi] Left panel table grouping incorrect, thanks to garas - garas +- bug #3123433 [interface] Avoid double escaping of MySQL errors.
3.3.9.0 (not yet released) - bug [doc] Fix references to MySQL doc diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 4b194de..ca99014 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -616,10 +616,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '', .' </p>' . "\n"; } // end if
- $tmp_mysql_error = ''; // for saving the original $error_message if (!empty($error_message)) { - $tmp_mysql_error = strtolower($error_message); // save the original $error_message - $error_message = htmlspecialchars($error_message); $error_message = preg_replace("@((\015\012)|(\015)|(\012)){3,}@", "\n\n", $error_message); } // modified to show the help on error-returns @@ -2992,10 +2989,10 @@ function PMA_selectUploadFile($import_list, $uploaddir) { }
/** - * Build titles and icons for action links + * Build titles and icons for action links * - * @return array the action titles - * @uses PMA_getIcon() + * @return array the action titles + * @uses PMA_getIcon() */ function PMA_buildActionTitles() { $titles = array(); diff --git a/sql.php b/sql.php index 351fb20..27a6c72 100644 --- a/sql.php +++ b/sql.php @@ -377,12 +377,12 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { $table = ''; } $active_page = $goto; - $message = PMA_Message::rawError(htmlspecialchars($error)); + $message = PMA_Message::rawError($error);
if( $GLOBALS['is_ajax_request'] == true) { PMA_ajaxResponse($message, false); } - + /** * Go to target path. */ @@ -391,7 +391,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { /** * HTML header. */ - + if($GLOBALS['is_ajax_request'] != true) { require_once './libraries/header.inc.php'; } @@ -545,7 +545,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { require_once './libraries/relation_cleanup.lib.php'; PMA_relationsCleanupColumn($db, $table, $dropped_column);
- } // end if column was dropped + } // end if column was dropped } // end else "didn't ask to see php code"
// No rows returned -> move back to the calling page @@ -600,7 +600,7 @@ if (0 == $num_rows || $is_affected) { $message->addMessage($_querytime); $message->addMessage(')'); } - + if( $GLOBALS['is_ajax_request'] == true) {
/** @@ -643,6 +643,10 @@ if (0 == $num_rows || $is_affected) { //if some posted fields need to be transformed, generate them here. $mime_map = PMA_getMIME($db, $table);
+ if ($mime_map === FALSE) { + $mime_map = array(); + } + $edited_values = array(); parse_str($_REQUEST['transform_fields_list'], $edited_values);
@@ -680,7 +684,7 @@ if (0 == $num_rows || $is_affected) { if (isset($GLOBALS['reload']) && $GLOBALS['reload'] == 1) { $extra_data['reload'] = 1; $extra_data['db'] = $GLOBALS['db']; - } + } PMA_ajaxResponse($message, $message->isSuccess(), (isset($extra_data) ? $extra_data : '')); }
@@ -691,7 +695,7 @@ if (0 == $num_rows || $is_affected) { if (isset($_REQUEST['purge'])) { $table = ''; unset($url_params['table']); - } + } include 'libraries/db_table_exists.lib.php';
if (strpos($goto, 'tbl_') === 0 && ! $is_table) { @@ -745,7 +749,7 @@ else { $GLOBALS['js_include'][] = 'sql.js';
unset($message); - + if( $GLOBALS['is_ajax_request'] != true) { if (strlen($table)) { require './libraries/tbl_common.php'; @@ -776,7 +780,7 @@ else { $fields_meta = PMA_DBI_get_fields_meta($result); $fields_cnt = count($fields_meta); } - + if( $GLOBALS['is_ajax_request'] != true ) { //begin the sqlqueryresults div here. container div echo '<div id="sqlqueryresults">'; @@ -786,7 +790,7 @@ else { if (isset($disp_query) && $cfg['ShowSQL'] == true) { PMA_showMessage($disp_message, $disp_query, 'success'); } - + if (isset($profiling_results)) { PMA_profilingResults($profiling_results, true); }
hooks/post-receive