diff --git a/ChangeLog b/ChangeLog index 207bbc098..7cccfddd4 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,14 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-04-28 Garvin Hicking + * index.php3, queryframe.php3, tbl_query_box.php3, querywindow.php3: + Even more issues when QueryFrameJS is set to true, but JS is not + activated. Haven't ever thought this would be necessary. ;) + I tested everything with QueryFrame/QueryFrameJS set to true/false + with and without JavaScript enabled, and got everything working. + Please verify for yourselves! :) + 2003-04-28 Marc Delisle * lang/polish: update, thanks to Jakub Wilk diff --git a/index.php3 b/index.php3 index 3a77d99e9..4dc1a92c8 100755 --- a/index.php3 +++ b/index.php3 @@ -49,12 +49,8 @@ if ($cfg['QueryHistoryDB'] && $cfgRelation['historywork']) { PMA_purgeHistory($cfg['Server']['user']); } -if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) { - $phpmain_hash = md5($cfg['PmaAbsoluteUri'] . time()); -} else { - $phpmain_hash = md5($cfg['PmaAbsoluteUri']); -} - +$phpmain_hash = md5($cfg['PmaAbsoluteUri']); +$phpmain_hash_js = time(); ?> @@ -66,14 +62,30 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) { - + - - - - + + + + + - + + + diff --git a/queryframe.php3 b/queryframe.php3 index 217ada54b..0b391fec9 100644 --- a/queryframe.php3 +++ b/queryframe.php3 @@ -96,7 +96,12 @@ if ($cfg['QueryFrameJS']) { } ?> <center> -<a href="<?php echo $href; ?>" <?php echo $target . ' ' . $onclick; ?>><?php echo $strQueryFrame; ?></a> +<script type="text/javascript"> +document.writeln('<a href="<?php echo $href; ?>" <?php echo $target . ' ' . $onclick; ?>><?php echo $strQueryFrame; ?></a>'); +</script> +<noscript> +<a href="<?php echo $href; ?>&amp;no_js=true" <?php echo $target . ' ' . $onclick; ?> target="phpmain<?php echo $hash; ?>"><?php echo $strQueryFrame; ?></a> +</noscript> </center> </body> diff --git a/querywindow.php3 b/querywindow.php3 index b93b7c588..b08116e9f 100644 --- a/querywindow.php3 +++ b/querywindow.php3 @@ -92,7 +92,7 @@ var confirmMsg = '<?php echo(($GLOBALS['cfg']['Confirm']) ? str_replace('\'', ' <body bgcolor="<?php echo ($cfg['QueryFrameJS'] ? $cfg['LeftBgColor'] : $cfg['RightBgColor']); ?>"> <?php -if ($cfg['QueryFrameJS']) { +if ($cfg['QueryFrameJS'] && !isset($no_js)) { $querydisplay_tab = (isset($querydisplay_tab) ? $querydisplay_tab : $cfg['QueryWindowDefTab']); if ($cfg['LightTabs']) { diff --git a/tbl_query_box.php3 b/tbl_query_box.php3 index a01874a2e..39afa4635 100755 --- a/tbl_query_box.php3 +++ b/tbl_query_box.php3 @@ -81,20 +81,16 @@ if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) { ?> <script type="text/javascript"> <!-- - document.writeln('<form method="post" target="phpmain' + <?php echo ((isset($is_inside_querywindow) && $is_inside_querywindow == TRUE) ? 'opener.' : ''); ?>top.frames.nav.document.hashform.hash.value + '" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; ?>'); - - document.writeln('onsubmit="return checkSqlQuery(this)" name="sqlform">'); + document.writeln('<form method="post" target="phpmain' + <?php echo ((isset($is_inside_querywindow) && $is_inside_querywindow == TRUE) ? 'opener.' : ''); ?>top.frames.nav.document.hashform.hash.value + '" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; ?> onsubmit="return checkSqlQuery(this)" name="sqlform">'); //--> </script> <noscript> - <form method="post" target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; echo "\n"; ?> - onsubmit="return checkSqlQuery(this)" name="sqlform"> + <form method="post" target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; ?> onsubmit="return checkSqlQuery(this)" name="sqlform"> </noscript> <?php } else { ?> - <form method="post" target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; echo "\n"; ?> - onsubmit="return checkSqlQuery(this)" name="sqlform"> + <form method="post" target="phpmain<?php echo md5($cfg['PmaAbsoluteUri']); ?>" action="read_dump.php3"<?php if ($is_upload) echo ' enctype="multipart/form-data"'; ?> onsubmit="return checkSqlQuery(this)" name="sqlform"> <?php } ?> @@ -300,19 +296,25 @@ if (!isset($is_inside_querywindow) || if ($cfg['QueryFrame'] && $cfg['QueryFrameJS']) { ?> - <script> - document.writeln('<div style="margin-bottom: 10px"><a href="<?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? '#' : $ldi_target); ?>" <?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? 'onclick="opener.top.frames.phpmain\' + opener.top.frames.nav.document.hashform.hash.value + \'.location.href = \'' . $ldi_target . '\'; return false;"' : ''); ?>><?php echo $strInsertTextfiles; ?></a></div>'); + <script type="text/javascript"> + document.writeln('<div style="margin-bottom: 10px"><a href="<?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? '#' : $ldi_target); ?>" <?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? 'onclick="opener.top.frames.phpmain\' + opener.top.frames.nav.document.hashform.hash.value + \'.location.href = \\\'' . $ldi_target . '\\\'; return false;"' : ''); ?>><?php echo $strInsertTextfiles; ?></a></div>'); </script> - + <?php } else { ?> - <div style="margin-bottom: 10px"><a href="<?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? '#' : $ldi_target); ?>" <?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? 'onclick="opener.top.frames.phpmain' . md5($cfg['PmaAbsoluteUri']) . '.location.href = \'' . $ldi_target . '\'; return false;"' : ''); ?>><?php echo $strInsertTextfiles; ?></a></div> + <script type="text/javascript"> + document.writeln('<div style="margin-bottom: 10px"><a href="<?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? '#' : $ldi_target); ?>" <?php echo (isset($is_inside_querywindow) && $is_inside_querywindow == TRUE ? 'onclick="opener.top.frames.phpmain' . md5($cfg['PmaAbsoluteUri']) . '.location.href = \\\'' . $ldi_target . '\\\'; return false;"' : ''); ?>><?php echo $strInsertTextfiles; ?></a></div>'); + </script> <?php } ?> + + <noscript> + <div style="margin-bottom: 10px"><a href="<?php echo $ldi_target; ?>"><?php echo $strInsertTextfiles; ?></a></div> + </noscript> </li> <?php }