Bug #736197 (EDIT link for query window)

This commit is contained in:
Garvin Hicking
2003-05-13 08:55:25 +00:00
parent 724e56b334
commit 65e4406c69
3 changed files with 16 additions and 1 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2003-05-13 Garvin Hicking <me@supergarv.de>
* footer.inc.php3, querywindow.php3: Fix bug #736197
(clicking on edit link from a sql-query now switches
to sql tab of the query window)
2003-05-13 Michal Cihar <nijel@users.sourceforge.net> 2003-05-13 Michal Cihar <nijel@users.sourceforge.net>
* left.php3: Fixed displaying of tables with quote in name. * left.php3: Fixed displaying of tables with quote in name.

View File

@@ -56,7 +56,15 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
function focus_querywindow(sql_query) { function focus_querywindow(sql_query) {
if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) { if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
top.frames.queryframe.querywindow.focus(); if (top.frames.queryframe.querywindow.document.querywindow.querydisplay_tab != 'sql') {
top.frames.queryframe.querywindow.document.querywindow.querydisplay_tab.value = "sql";
top.frames.queryframe.querywindow.document.querywindow.query_history_latest.value = sql_query;
top.frames.queryframe.querywindow.document.querywindow.submit();
top.frames.queryframe.querywindow.focus();
} else {
top.frames.queryframe.querywindow.focus();
}
return false; return false;
} else if (top.frames.queryframe) { } else if (top.frames.queryframe) {
new_win_url = 'querywindow.php3?sql_query=' + sql_query + '&<?php echo PMA_generate_common_url(isset($db) ? addslashes($db) : '', isset($table) ? addslashes($table) : '', '&'); ?>'; new_win_url = 'querywindow.php3?sql_query=' + sql_query + '&<?php echo PMA_generate_common_url(isset($db) ? addslashes($db) : '', isset($table) ? addslashes($table) : '', '&'); ?>';

View File

@@ -146,6 +146,8 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
$db = $query_history_latest_db; $db = $query_history_latest_db;
$table = $query_history_latest_table; $table = $query_history_latest_table;
$dup_sql[$query_history_latest] = true; $dup_sql[$query_history_latest] = true;
} elseif (isset($query_history_latest) && $query_history_latest != '') {
$sql_query = urldecode($query_history_latest);
} }
if (isset($sql_query)) { if (isset($sql_query)) {