bug 998698 db dropdown refresh

This commit is contained in:
Marc Delisle
2004-08-05 17:21:28 +00:00
parent 500d501670
commit dbd97eca13
2 changed files with 26 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ $Source$
(Patches from Michael Keck)
* index.php: names and ids for framesets in the noscript section
* updated themes screenshots
* left.php: bug 998698, db dropdown refresh
(me)
* lang/galician: Updated, thanks to Xosé Calvo.
* lang/swedish: Updated, thanks to Björn T. Hallberg (bth).

View File

@@ -891,6 +891,31 @@ else {
echo '<p>' . $strNoDatabases . '</p>';
} // end if ($num_dbs == 0)
echo "\n";
// 2004-08-05 added by Michael Keck
// reload queryframe if it exists and we delete a database
// or select a database from the db_list.
$my_lightm_db = '';
if (isset($lightm_db) && $lightm_db!='') {
$my_lightm_db = $lightm_db;
}
if ($cfg['LeftFrameLight'] && $cfg['QueryFrame'] && $cfg['QueryFrameJS']) {
if (!isset($table_array) || count($table_array)==0) {
$my_url_query = PMA_generate_common_url('', '', '&');
?>
<script language="JavaScript" type="text/javascript">
<!--
if (typeof(window.parent.frames['queryframe'])!='undefined' && typeof(window.parent.frames['queryframe'].document.forms['left'])!='undefined') {
if (window.parent.frames['queryframe'].document.forms['left'].elements['lightm_db'].value!='<?php echo $my_lightm_db; ?>') {
window.parent.frames['queryframe'].location.replace('<?php echo 'queryframe.php?' . $my_url_query . '&hash=' . $hash; ?>');
}
}
//-->
</script>
<?php
}
}
?>
</body>