Fix %f expansion (bug #1355776).

This commit is contained in:
Michal Čihař
2005-11-14 13:32:16 +00:00
parent 6bb690314d
commit eb4e941137
2 changed files with 9 additions and 1 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2005-11-14 Michal Čihař <michal@cihar.com>
* libraries/sql_query_form.lib.php: Fix %f expansion (bug #1355776).
2005-11-14 Sebastian Mendel <cybot_tm@users.sourceforge.net> 2005-11-14 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* themes/*/css/theme_right.css.php, css/phpmyadmin.css.php: * themes/*/css/theme_right.css.php, css/phpmyadmin.css.php:
bug #1342683 Wrong URL to error.ico bug #1342683 Wrong URL to error.ico

View File

@@ -251,12 +251,17 @@ function PMA_sqlQueryFormInsert( $query = '', $is_querywindow = false ) {
// $strDBLink = htmlspecialchars( $db ); // $strDBLink = htmlspecialchars( $db );
$legend = sprintf( $GLOBALS['strRunSQLQuery'], $strDBLink ); $legend = sprintf( $GLOBALS['strRunSQLQuery'], $strDBLink );
if ( empty( $query ) && count( $fields_list ) ) { if ( empty( $query ) && count( $fields_list ) ) {
$field_names = array();
foreach ( $fields_list as $field ) {
$field_names[] = PMA_backquote($field['Field']);
}
$query = $query =
str_replace( '%d', PMA_backquote( $db ), str_replace( '%d', PMA_backquote( $db ),
str_replace( '%t', PMA_backquote( $table ), str_replace( '%t', PMA_backquote( $table ),
str_replace( '%f', str_replace( '%f',
implode( ', ', PMA_backquote( $fields_list ) ), implode( ', ', $field_names ),
$GLOBALS['cfg']['DefaultQueryTable'] ) ) ); $GLOBALS['cfg']['DefaultQueryTable'] ) ) );
unset($field_names);
} }
} }
$legend .= ': ' . PMA_showMySQLDocu( 'SQL-Syntax', 'SELECT' ); $legend .= ': ' . PMA_showMySQLDocu( 'SQL-Syntax', 'SELECT' );