Bugfix for querywindow: Didn't show the latest queries.
This commit is contained in:
@@ -6,6 +6,8 @@ $Id$
|
|||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
2003-03-12 Garvin Hicking <me@supergarv.de>
|
2003-03-12 Garvin Hicking <me@supergarv.de>
|
||||||
|
* header.inc.php3, querywindow.php3, libraries/common.lib.php3: Fixed some bugs for
|
||||||
|
the querywindow which didn't show the latest querys always.
|
||||||
* Documentation.html, db_details.php3, read_dump.php3, tbl_query_box.php3:
|
* Documentation.html, db_details.php3, read_dump.php3, tbl_query_box.php3:
|
||||||
RFE #470000 - Use parameters for bookmarked queries. This is a bit tricky
|
RFE #470000 - Use parameters for bookmarked queries. This is a bit tricky
|
||||||
to do, so please see Documentation.html. I thought it too hard to move the
|
to do, so please see Documentation.html. I thought it too hard to move the
|
||||||
|
@@ -145,17 +145,20 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function focus_querywindow() {
|
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();
|
top.frames.queryframe.querywindow.focus();
|
||||||
|
return false;
|
||||||
} else if (top.frames.queryframe) {
|
} else if (top.frames.queryframe) {
|
||||||
top.frames.queryframe.querywindow=window.open('querywindow.php3?<?php echo PMA_generate_common_url('', ''); ?>&db=<?php echo (isset($db) ? htmlspecialchars($db) : ''); ?>&table=<?php echo (isset($table) ? htmlspecialchars($table) : ''); ?>', 'js_querywindow','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=<?php echo $cfg['QueryWindowWidth']; ?>,height=<?php echo $cfg['QueryWindowHeight']; ?>');
|
new_win_url = 'querywindow.php3?sql_query=' + sql_query + '&<?php echo PMA_generate_common_url('', ''); ?>&db=<?php echo (isset($db) ? htmlspecialchars($db) : ''); ?>&table=<?php echo (isset($table) ? htmlspecialchars($table) : ''); ?>';
|
||||||
|
top.frames.queryframe.querywindow=window.open(new_win_url, 'js_querywindow','toolbar=0,location=1,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=<?php echo $cfg['QueryWindowWidth']; ?>,height=<?php echo $cfg['QueryWindowHeight']; ?>');
|
||||||
|
|
||||||
if (!top.frames.queryframe.querywindow.opener) {
|
if (!top.frames.queryframe.querywindow.opener) {
|
||||||
top.frames.queryframe.querywindow.opener = top.frames.queryframe;
|
top.frames.queryframe.querywindow.opener = top.frames.queryframe;
|
||||||
}
|
}
|
||||||
|
|
||||||
reload_querywindow();
|
// reload_querywindow();
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1376,7 +1376,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
|||||||
|
|
||||||
$onclick = '';
|
$onclick = '';
|
||||||
if ($cfg['QueryFrameJS'] && $cfg['QueryFrame']) {
|
if ($cfg['QueryFrameJS'] && $cfg['QueryFrame']) {
|
||||||
$onclick = 'onclick="focus_querywindow(); return false;"';
|
$onclick = 'onclick="focus_querywindow(\'' . urlencode($GLOBALS['sql_query']) . '\'); return false;"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$edit_link = ' [<a href="'
|
$edit_link = ' [<a href="'
|
||||||
|
@@ -140,10 +140,13 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
|||||||
$sql_query = urldecode($query_history_latest);
|
$sql_query = urldecode($query_history_latest);
|
||||||
$db = $query_history_latest_db;
|
$db = $query_history_latest_db;
|
||||||
$table = $query_history_latest_table;
|
$table = $query_history_latest_table;
|
||||||
$show_query = 1;
|
|
||||||
$dup_sql[$query_history_latest] = true;
|
$dup_sql[$query_history_latest] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($sql_query)) {
|
||||||
|
$show_query = 1;
|
||||||
|
}
|
||||||
|
|
||||||
if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) {
|
if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) {
|
||||||
|
|
||||||
$temp_history = PMA_getHistory($cfg['Server']['user']);
|
$temp_history = PMA_getHistory($cfg['Server']['user']);
|
||||||
|
Reference in New Issue
Block a user