Skip to content

Commit

Permalink
More javascript checks for querywindow.
Browse files Browse the repository at this point in the history
  • Loading branch information
Garvin Hicking committed Feb 26, 2003
1 parent 63c5582 commit bee0503
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
5 changes: 4 additions & 1 deletion ChangeLog
Expand Up @@ -19,7 +19,10 @@ $Source$
SQL-History.
Removed a dupe for inserting comments, fixed integrity check when
moving/renaming tables and keeping comments.

* header.inc.php3: Added one more Javascript if-structure to make sure
the frameset is initialized when querying for an active window. Without
this, when starting phpMyAdmin for the first time, IE6 may complain
depending on the order it loads the framesets.

2003-02-25 Marc Delisle <lem9@users.sourceforge.net>
* db_details_structure.php3: undefined variable $comment
Expand Down
6 changes: 3 additions & 3 deletions header.inc.php3
Expand Up @@ -252,7 +252,7 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
}

function reload_querywindow () {
if (top.frames.queryframe && !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) {
<?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) : '') ?>";
Expand All @@ -268,9 +268,9 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
}

function focus_querywindow() {
if (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();
} else {
} 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']; ?>');

if (!top.frames.queryframe.querywindow.opener) {
Expand Down

0 comments on commit bee0503

Please sign in to comment.