Fix popup SQL window so that two different phpPgAdmin instances should not want to...
authorchriskl <chriskl>
Fri, 28 May 2004 08:41:58 +0000 (08:41 +0000)
committerchriskl <chriskl>
Fri, 28 May 2004 08:41:58 +0000 (08:41 +0000)
BUGS
HISTORY
topbar.php

diff --git a/BUGS b/BUGS
index a623289928155cc166548dc3ce12f90b2b53388b..26d348f2aa1cd0ced0a56f0e141eb91b6981e563 100644 (file)
--- a/BUGS
+++ b/BUGS
@@ -32,6 +32,5 @@ NEEDS TESTING
 * prevent the user from dropping all the superusers
 * getView() isn't schema-aware for 7.3+?
 * rename function in 7.2 and below doesn't come back to the correct function
-* Fix sql window being referenced from two different versions of phppgadmin
 * Check domain constraint search pre 7.3
 
diff --git a/HISTORY b/HISTORY
index 268b59cfa450250f05de4eec4df8b9e88ee4502d..ee96a44b9fd7ac7ef85192f012e91a6259a0702e 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -42,6 +42,8 @@ Bugs
 * Fix bug where views appeared as tables in 7.0.x search results
 * Fix bug where find object SQL on < 7.2 was broken
 * Fix Find for domain constraints
+* Fix popup SQL window so that two different phpPgAdmin instances should
+  not want to use the same pop-up.
 
 Translations
 * Trad. Chinese from Chih-Hsin Lee
index ea1983146635d9ab835ddaedf16b954e709f7a8b..805c361a6a98c7a1c32a1e2fd37273fa26af7cf6 100755 (executable)
@@ -3,12 +3,15 @@
        /**
         * Top menu for phpPgAdmin
         *
-        * $Id: topbar.php,v 1.21 2004/05/08 13:06:09 chriskl Exp $
+        * $Id: topbar.php,v 1.22 2004/05/28 08:41:58 chriskl Exp $
         */
 
        // Include application functions
        include_once('./libraries/lib.inc.php');
        
+       // To prevent SQL popup windows from conflicting
+       $window_id = "sqledit_{$_SESSION['webdbServerID']}_" . rand();
+       
        $misc->printHeader();
        $misc->printBody('topbar');
        $dbselected = isset($_REQUEST['database']) ? '&database=' . $_REQUEST['database'] : '';
@@ -39,8 +42,8 @@
 <?php if ($conf['show_reports']) : ?>
                        <a class="toplink" href="reports.php" target="detail"><?php echo $lang['strreports'] ?></a> |
 <?php endif; ?>
-                       <a class="toplink" href="sqledit.php" target="sqledit" onclick="window.open('sqledit.php?action=sql<?php echo $dbselected ?>&<?php echo SID ?>','sqledit','toolbar=no,width=600,height=400,resizable=yes,scrollbars=no').focus(); return false;"><?php echo $lang['strsql'] ?></a> |
-                       <a class="toplink" href="sqledit.php" target="sqledit" onclick="window.open('sqledit.php?action=find<?php echo $dbselected ?>&<?php echo SID ?>','sqledit','toolbar=no,width=600,height=400,resizable=yes,scrollbars=no').focus(); return false;"><?php echo $lang['strfind'] ?></a> |                  
+                       <a class="toplink" href="sqledit.php" target="sqledit" onclick="window.open('sqledit.php?action=sql<?php echo $dbselected ?>&<?php echo SID ?>','<?php echo htmlspecialchars($window_id) ?>','toolbar=no,width=600,height=400,resizable=yes,scrollbars=no').focus(); return false;"><?php echo $lang['strsql'] ?></a> |
+                       <a class="toplink" href="sqledit.php" target="sqledit" onclick="window.open('sqledit.php?action=find<?php echo $dbselected ?>&<?php echo SID ?>','<?php echo htmlspecialchars($window_id) ?>','toolbar=no,width=600,height=400,resizable=yes,scrollbars=no').focus(); return false;"><?php echo $lang['strfind'] ?></a> |                       
                        <a class="toplink" href="logout.php" target="_parent"><?php echo $lang['strlogout'] ?></a>
                </td>
        </tr>