Fix default query generating.

This commit is contained in:
Michal Čihař
2004-06-03 15:03:10 +00:00
parent f88a238a1f
commit 9ae2cb318c
2 changed files with 8 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ $Source$
Can disable main page icons (bug #965550).
* header.inc.php, css/phpmyadmin.css.php: Use span insted of div, div is
not allowed here.
* tbl_query_box.php: Fix default query generating.
2004-06-02 Alexander M. Turek <happybirthdaytome@derrabus.de>
* db_details_db_info.php, tbl_properties_tbl_info.php: Table type is called

View File

@@ -142,9 +142,14 @@ if (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE) {
if (! empty($query_to_display)) {
echo htmlspecialchars($query_to_display);
} else {
$query = str_replace('%d', PMA_backquote($db), $cfg['DefaultQueryDatabase']);
if (isset($table)) {
$query = str_replace('%f', implode(', ', PMA_backquote($fields_list)), $cfg['DefaultQueryTable']);
$query = $cfg['DefaultQueryTable'];
} else {
$query = $cfg['DefaultQueryDatabase'];
}
$query = str_replace('%d', PMA_backquote($db), $query);
if (isset($table)) {
$query = str_replace('%f', implode(', ', PMA_backquote($fields_list)), $query);
$query = str_replace('%t', PMA_backquote($table), $query);
}
echo htmlspecialchars($query);