From 7a0baa863a0f4f2ecfeba82ea1a4805cb3e9ea46 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Wed, 19 Oct 2005 15:16:56 +0000 Subject: [PATCH] open db link from querywindow in main frame --- ChangeLog | 1 + libraries/sql_query_form.lib.php | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 348493663..2c00ad7c2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ $Source$ moved not always needed code out of event handler, fixed display with larger font * libraries/function.js, css/phpmyadmin.css.php: added mark and hover effect to every table of class data + * libraries/sql_query_form.lib.php: open db link from querywindow in main frame 2005-10-18 Michal Čihař * libraries/relation.lib.php: Do not set database if not needed. diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php index 86462dd2f..31883718b 100644 --- a/libraries/sql_query_form.lib.php +++ b/libraries/sql_query_form.lib.php @@ -215,7 +215,12 @@ function PMA_sqlQueryFormInsert( $query = '', $is_querywindow = false ) { $db = $GLOBALS['db']; // if you want navigation: $strDBLink = '' + . '?' . PMA_generate_common_url( $db ) . '"'; + if ( $is_querywindow ) { + $strDBLink .= ' target="_self"' + . ' onclick="this.target=window.opener.frames[1].name"'; + } + $strDBLink .= '>' . htmlspecialchars( $db ) . ''; // else use // $strDBLink = htmlspecialchars( $db ); @@ -235,7 +240,12 @@ function PMA_sqlQueryFormInsert( $query = '', $is_querywindow = false ) { . '.' . PMA_backquote( $GLOBALS['table'] )); $strDBLink = '' + . '?' . PMA_generate_common_url( $db ) . '"'; + if ( $is_querywindow ) { + $strDBLink .= ' target="_self"' + . ' onclick="this.target=window.opener.frames[1].name"'; + } + $strDBLink .= '>' . htmlspecialchars( $db ) . ''; // else use // $strDBLink = htmlspecialchars( $db );