From a0934bdefdcd14a5b277d8eb27e57661afb11551 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Thu, 6 Sep 2007 13:31:38 +0000 Subject: [PATCH] make better use of PMA_generate_common_hidden_inputs(); make use of PMA_getIcon(); --- js/querywindow.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/js/querywindow.js b/js/querywindow.js index a07d16794..b3780ad36 100644 --- a/js/querywindow.js +++ b/js/querywindow.js @@ -20,8 +20,18 @@ var query_to_load = ''; * * @param string db name */ -function setDb(new_db) { +function setDb(new_db, decode) { //alert('setDb(' + new_db + ')'); + + if (decode) { + //alert(new_db); + new_db = new_db.replace("&", "&"); + new_db = new_db.replace(""", '"'); + new_db = new_db.replace("'", "'"); + new_db = new_db.replace("<", "<"); + new_db = new_db.replace(">", ">"); + //alert(new_db); + } if (new_db != db) { // db has changed //alert( new_db + '(' + new_db.length + ') : ' + db ); @@ -91,6 +101,7 @@ function refreshMain(url) { url = 'main.php'; } } + //alert(db); goTo(url + '?server=' + encodeURIComponent(server) + '&db=' + encodeURIComponent(db) + '&table=' + encodeURIComponent(table) + @@ -321,6 +332,7 @@ function refreshQuerywindow( url ) { * @param string target frame where to load the new url */ function goTo(targeturl, target) { + //alert(targeturl); if ( target == 'main' ) { target = window.frame_content; } else if ( target == 'query' ) { @@ -348,9 +360,9 @@ function goTo(targeturl, target) { } // opens selected db in main frame -function openDb(new_db) { +function openDb(new_db, decode) { //alert('opendb(' + new_db + ')'); - setDb(new_db); + setDb(new_db, decode); setTable(''); refreshMain(opendb_url); return true;