From d27b8efab94aebe3ca9a8978c244b10e67affb6a Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Mon, 26 Mar 2007 14:50:14 +0000 Subject: [PATCH] removed unnecessary JavaScript code (due to session based history) --- js/querywindow.js | 14 +++++------ querywindow.php | 62 ++++++++++++----------------------------------- 2 files changed, 22 insertions(+), 54 deletions(-) diff --git a/js/querywindow.js b/js/querywindow.js index 15b53f892..a07d16794 100644 --- a/js/querywindow.js +++ b/js/querywindow.js @@ -219,17 +219,16 @@ function setAll( new_lang, new_collation_connection, new_server, new_db, new_tab } } -function reload_querywindow( db, table, sql_query ) { +function reload_querywindow(db, table, sql_query) +{ if ( ! querywindow.closed && querywindow.location ) { if ( ! querywindow.document.sqlform.LockFromUpdate || ! querywindow.document.sqlform.LockFromUpdate.checked ) { querywindow.document.getElementById('hiddenqueryform').db.value = db; - querywindow.document.getElementById('hiddenqueryform').query_history_latest_db.value = db; querywindow.document.getElementById('hiddenqueryform').table.value = table; - querywindow.document.getElementById('hiddenqueryform').query_history_latest_table.value = table; - if ( sql_query ) { - querywindow.document.getElementById('hiddenqueryform').query_history_latest.value = sql_query; + if (sql_query) { + querywindow.document.getElementById('hiddenqueryform').sql_query.value = sql_query; } querywindow.document.getElementById('hiddenqueryform').submit(); @@ -240,7 +239,8 @@ function reload_querywindow( db, table, sql_query ) { /** * brings query window to front and inserts query to be edited */ -function focus_querywindow( sql_query ) { +function focus_querywindow(sql_query) +{ /* if ( querywindow && !querywindow.closed && querywindow.location) { */ if ( !querywindow || querywindow.closed || !querywindow.location) { // we need first to open the window and cannot pass the query with it @@ -253,7 +253,7 @@ function focus_querywindow( sql_query ) { //var querywindow = querywindow; if ( querywindow.document.getElementById('hiddenqueryform').querydisplay_tab != 'sql' ) { querywindow.document.getElementById('hiddenqueryform').querydisplay_tab.value = "sql"; - querywindow.document.getElementById('hiddenqueryform').query_history_latest.value = sql_query; + querywindow.document.getElementById('hiddenqueryform').sql_query.value = sql_query; querywindow.document.getElementById('hiddenqueryform').submit(); querywindow.focus(); } else { diff --git a/querywindow.php b/querywindow.php index 9514c8f31..95795648a 100644 --- a/querywindow.php +++ b/querywindow.php @@ -133,14 +133,6 @@ if ($GLOBALS['cfg']['PropertiesIconic']) { $titles['Change'] = $GLOBALS['strChange']; } - -// Hidden forms and query frame interaction stuff -if (PMA_isValid($_REQUEST['query_history_latest'])) { - $sql_query = $_REQUEST['query_history_latest']; - $db = PMA_ifSetOr($_REQUEST['query_history_latest_db'], ''); - $table = PMA_ifSetOr($_REQUEST['query_history_latest_table'], ''); -} - $url_query = PMA_generate_common_url($db, $table); if (PMA_isValid($sql_query)) { @@ -258,41 +250,22 @@ if (! empty($_sql_history) .'