RFE #715914
This commit is contained in:
@@ -5,6 +5,14 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2003-04-06 Garvin Hicking <me@supergarv.de>
|
||||
* header.inc.php3, footer.inc.php3, libraries/common.lib.php3,
|
||||
libraries/relation.lib.php3: RFE #715914: Sort query history by
|
||||
(autoincrement) key instead of timevalue. Only save queries in
|
||||
history if they were successful. This required the moving of
|
||||
the JS-stuff in header.inc.php3 to footer.inc.php3. Please
|
||||
test, if this works for everyone. It does for me.
|
||||
|
||||
2003-04-06 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||
* db_datadict.php3: The result of SHOW INDEX does not have a 'Comment'
|
||||
column before MySQL 3.23 (bug #712055).
|
||||
|
@@ -5,6 +5,68 @@
|
||||
// In this file you may add PHP or HTML statements that will be used to define
|
||||
// the footer for phpMyAdmin pages.
|
||||
|
||||
/**
|
||||
* Query window
|
||||
*/
|
||||
|
||||
// If query window is wanted and open, update with latest selected db/table.
|
||||
if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
?>
|
||||
<script>
|
||||
<?php
|
||||
if ($cfg['QueryFrameDebug']) {
|
||||
?>
|
||||
document.writeln("Updating query window. DB: <?php echo (isset($db) ? $db : 'FALSE'); ?>, Table: <?php echo (isset($table) ? $table : 'FALSE'); ?><br>");
|
||||
document.writeln("Window: " + top.frames.queryframe.querywindow.location + "<br>");
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
if (top.frames.queryframe && top.frames.queryframe.document && top.frames.queryframe.document.queryframeform) {
|
||||
top.frames.queryframe.document.queryframeform.db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : ''); ?>";
|
||||
top.frames.queryframe.document.queryframeform.table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : ''); ?>";
|
||||
}
|
||||
|
||||
function reload_querywindow () {
|
||||
if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
|
||||
<?php echo ($cfg['QueryFrameDebug'] ? 'document.writeln("<a href=\'#\' onClick=\'top.frames.queryframe.querywindow.focus(); return false;\'>Query Window</a> can be updated.<br>");' : ''); ?>
|
||||
|
||||
top.frames.queryframe.querywindow.document.querywindow.db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : '') ?>";
|
||||
top.frames.queryframe.querywindow.document.querywindow.query_history_latest_db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : '') ?>";
|
||||
top.frames.queryframe.querywindow.document.querywindow.table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : '') ?>";
|
||||
top.frames.queryframe.querywindow.document.querywindow.query_history_latest_table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : '') ?>";
|
||||
|
||||
<?php echo (isset($sql_query) ? 'top.frames.queryframe.querywindow.document.querywindow.query_history_latest.value = "' . urlencode($sql_query) . '";' : '// no sql query update'); ?>
|
||||
|
||||
<?php echo ($cfg['QueryFrameDebug'] ? 'alert(\'Querywindow submits. Last chance to check variables.\');' : ''); ?>
|
||||
<?php echo ((!isset($error_message) || $error_message == '') ? 'top.frames.queryframe.querywindow.document.querywindow.submit();' : '// no submit, query was invalid'); ?>
|
||||
}
|
||||
}
|
||||
|
||||
function focus_querywindow(sql_query) {
|
||||
if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
|
||||
top.frames.queryframe.querywindow.focus();
|
||||
return false;
|
||||
} else if (top.frames.queryframe) {
|
||||
new_win_url = 'querywindow.php3?sql_query=' + sql_query + '&<?php echo PMA_generate_common_url(isset($db) ? $db : '', isset($table) ? $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) {
|
||||
top.frames.queryframe.querywindow.opener = top.frames.queryframe;
|
||||
}
|
||||
|
||||
// reload_querywindow();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
reload_querywindow();
|
||||
self.focus();
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Close MySql non-persistent connections
|
||||
*/
|
||||
|
@@ -110,65 +110,6 @@ var errorMsg2 = '<?php echo str_replace('\'', '\\\'', $GLOBALS['strNotValidNum
|
||||
<?php
|
||||
}
|
||||
echo "\n";
|
||||
|
||||
// If query window is wanted and open, update with latest selected db/table.
|
||||
if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
|
||||
?>
|
||||
<script>
|
||||
<?php
|
||||
if ($cfg['QueryFrameDebug']) {
|
||||
?>
|
||||
document.writeln("Updating query window. DB: <?php echo (isset($db) ? $db : 'FALSE'); ?>, Table: <?php echo (isset($table) ? $table : 'FALSE'); ?><br>");
|
||||
document.writeln("Window: " + top.frames.queryframe.querywindow.location + "<br>");
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
if (top.frames.queryframe && top.frames.queryframe.document && top.frames.queryframe.document.queryframeform) {
|
||||
top.frames.queryframe.document.queryframeform.db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : ''); ?>";
|
||||
top.frames.queryframe.document.queryframeform.table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : ''); ?>";
|
||||
}
|
||||
|
||||
function reload_querywindow () {
|
||||
if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
|
||||
<?php echo ($cfg['QueryFrameDebug'] ? 'document.writeln("<a href=\'#\' onClick=\'top.frames.queryframe.querywindow.focus(); return false;\'>Query Window</a> can be updated.<br>");' : ''); ?>
|
||||
|
||||
top.frames.queryframe.querywindow.document.querywindow.db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : '') ?>";
|
||||
top.frames.queryframe.querywindow.document.querywindow.query_history_latest_db.value = "<?php echo (isset($db) ? htmlspecialchars($db) : '') ?>";
|
||||
top.frames.queryframe.querywindow.document.querywindow.table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : '') ?>";
|
||||
top.frames.queryframe.querywindow.document.querywindow.query_history_latest_table.value = "<?php echo (isset($table) ? htmlspecialchars($table) : '') ?>";
|
||||
|
||||
<?php echo (isset($sql_query) ? 'top.frames.queryframe.querywindow.document.querywindow.query_history_latest.value = "' . urlencode($sql_query) . '";' : ''); ?>
|
||||
|
||||
<?php echo ($cfg['QueryFrameDebug'] ? 'alert(\'Querywindow submits. Last chance to check variables.\');' : ''); ?>
|
||||
top.frames.queryframe.querywindow.document.querywindow.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function focus_querywindow(sql_query) {
|
||||
if (top.frames.queryframe && top.frames.queryframe.querywindow && !top.frames.queryframe.querywindow.closed && top.frames.queryframe.querywindow.location) {
|
||||
top.frames.queryframe.querywindow.focus();
|
||||
return false;
|
||||
} else if (top.frames.queryframe) {
|
||||
new_win_url = 'querywindow.php3?sql_query=' + sql_query + '&<?php echo PMA_generate_common_url(isset($db)?$db:'', isset($table)?$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) {
|
||||
top.frames.queryframe.querywindow.opener = top.frames.queryframe;
|
||||
}
|
||||
|
||||
// reload_querywindow();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
reload_querywindow();
|
||||
self.focus();
|
||||
|
||||
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</head>
|
||||
|
||||
|
@@ -409,7 +409,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
$is_modify_link = TRUE, $back_url = '',
|
||||
$exit = TRUE)
|
||||
{
|
||||
global $cfg;
|
||||
global $cfg, $table, $db, $sql_query;
|
||||
|
||||
if (empty($GLOBALS['is_header_sent'])) {
|
||||
include('./header.inc.php3');
|
||||
|
@@ -511,7 +511,7 @@ if (!defined('PMA_RELATION_LIB_INCLUDED')){
|
||||
. PMA_backquote('db') . ','
|
||||
. PMA_backquote('table') . ','
|
||||
. PMA_backquote('sqlquery')
|
||||
. ' FROM ' . PMA_backquote($cfgRelation['history']) . ' WHERE username = \'' . PMA_sqlAddslashes($username) . '\' ORDER BY timevalue DESC');
|
||||
. ' FROM ' . PMA_backquote($cfgRelation['history']) . ' WHERE username = \'' . PMA_sqlAddslashes($username) . '\' ORDER BY id DESC');
|
||||
|
||||
$history = array();
|
||||
|
||||
|
Reference in New Issue
Block a user