diff --git a/ChangeLog b/ChangeLog index ad9e4783b..a1430ff1d 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-11-14 Michal Čihař + * libraries/sql_query_form.lib.php: Fix %f expansion (bug #1355776). + 2005-11-14 Sebastian Mendel * themes/*/css/theme_right.css.php, css/phpmyadmin.css.php: bug #1342683 Wrong URL to error.ico diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index 5d148c789..eac2b8e06 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -251,12 +251,17 @@ function PMA_sqlQueryFormInsert( $query = '', $is_querywindow = false ) { // $strDBLink = htmlspecialchars( $db ); $legend = sprintf( $GLOBALS['strRunSQLQuery'], $strDBLink ); if ( empty( $query ) && count( $fields_list ) ) { + $field_names = array(); + foreach ( $fields_list as $field ) { + $field_names[] = PMA_backquote($field['Field']); + } $query = str_replace( '%d', PMA_backquote( $db ), str_replace( '%t', PMA_backquote( $table ), str_replace( '%f', - implode( ', ', PMA_backquote( $fields_list ) ), + implode( ', ', $field_names ), $GLOBALS['cfg']['DefaultQueryTable'] ) ) ); + unset($field_names); } } $legend .= ': ' . PMA_showMySQLDocu( 'SQL-Syntax', 'SELECT' );