Should be the fix for Bug #730718. Moved the hashform from the

"nav"-frame to the "queryframe"-frame,      altered the way the form is
submitted in LeftFrameLight mode to      keep the queryframe. Only if
JavaScript is usable, otherwise it's      not necessary to keep the 'opener'
pointer.
This commit is contained in:
Garvin Hicking
2003-05-02 19:56:45 +00:00
parent 3177fcc672
commit b2e5dfc23c
8 changed files with 42 additions and 10 deletions

View File

@@ -18,6 +18,13 @@ $Source$
Patch Tracker #709383 for further information.
* libraries/display_tbl.lib.php3: Bug #728813 (title for
relations when foreign_db != master_db)
* index.php3, left.php3, tbl_query_box.php3, db_details_common.php3,
main.php3, queryframe.php3, libraries/common.lib.php3: Should be
the fix for Bug #730718.
Moved the hashform from the "nav"-frame to the "queryframe"-frame,
altered the way the form is submitted in LeftFrameLight mode to
keep the queryframe. Only if JavaScript is usable, otherwise it's
not necessary to keep the 'opener' pointer.
2003-04-30 Marc Delisle <lem9@users.sourceforge.net>
* pdf_schema.php3, bug 729517, better comment output,

View File

@@ -47,7 +47,7 @@ if (!isset($message)) {
?>
<script type="text/javascript" language="javascript1.2">
<!--
window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url($db, '', '&'); ?>&hash=' + window.parent.frames['nav'].document.hashform.hash.value);
window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url($db, '', '&'); ?>');
//-->
</script>
<?php

View File

@@ -82,7 +82,7 @@ $phpmain_hash_js = time();
<?php
} else {
?>
<frame src="left.php3?<?php echo $url_query; ?>&amp;hash=<?php echo $phpmain_hash; ?>" name="nav" frameborder="0" />
<frame src="left.php3?<?php echo $url_query; ?>&amp;hash=' . $phpmain_hash . '" name="nav" frameborder="0" />
<?php
}
?>

View File

@@ -8,6 +8,10 @@
* been defined as startup option and include a core library
*/
require('./libraries/grab_globals.lib.php3');
if (isset($lightm_db) && !empty($lightm_db)) {
$db = urldecode($lightm_db);
}
if (!empty($db)) {
$db_start = $db;
}
@@ -61,6 +65,19 @@ PMA_setFontSizes();
<title>phpMyAdmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
<base<?php if (!empty($cfg['PmaAbsoluteUri'])) echo ' href="' . $cfg['PmaAbsoluteUri'] . '"'; ?> target="phpmain<?php echo $hash; ?>" />
<script type="text/javascript" language="javascript">
<!--
<?php
if (isset($lightm_db) && !empty($lightm_db)) {
?>
window.parent.frames['phpmain<?php echo $hash; ?>'].location.replace('./<?php echo $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db, '', '&');?>');
<?php
}
?>
//-->
</script>
<?php
// Expandable/collapsible databases list is only used if there is more than one
// database to display
@@ -155,8 +172,16 @@ if ($num_dbs > 1) {
// Light mode -> beginning of the select combo for databases
if ($cfg['LeftFrameLight']) {
echo ' <form method="post" action="index.php3" name="left" target="_parent">' . "\n";
?>
<script type="text/javascript" language="javascript">
document.writeln('<form method="post" action="left.php3" name="left" target="nav">');
</script>
<noscript>
<form method="post" action="index.php3" name="left" target="_parent">
</noscript>
<?php
echo PMA_generate_common_hidden_inputs();
echo ' <input type="hidden" name="hash" value="' . $hash . '" />' . "\n";
echo ' <select name="lightm_db" onchange="this.form.submit()">' . "\n";
echo ' <option value="">(' . $strDatabases . ') ...</option>' . "\n";
$table_list = '';
@@ -439,9 +464,6 @@ else {
echo "\n";
?>
<form name="hashform" action="left.php3">
<input type="hidden" name="hash" value="<?php echo $hash; ?>">
</form>
</body>
</html>

View File

@@ -1267,7 +1267,7 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
<!--
if (typeof(window.parent) != 'undefined'
&& typeof(window.parent.frames['nav']) != 'undefined') {
window.parent.frames['nav'].location.replace('<?php echo $reload_url; ?>&hash=' + window.parent.frames['nav'].document.hashform.hash.value);
window.parent.frames['nav'].location.replace('<?php echo $reload_url; ?>');
}
//-->
</script>

View File

@@ -43,7 +43,7 @@ else if (isset($reload) && $reload) {
?>
<script type="text/javascript" language="javascript1.2">
<!--
window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url('', '', '&'); ?>&hash=' + window.parent.frames['nav'].document.hashform.hash.value);
window.parent.frames['nav'].location.replace('./left.php3?<?php echo PMA_generate_common_url('', '', '&');?>');
//-->
</script>
<?php

View File

@@ -104,6 +104,9 @@ document.writeln('<a href="<?php echo $href; ?>" <?php echo $target . ' ' . $onc
</noscript>
</center>
<form name="hashform" action="queryframe.php3">
<input type="hidden" name="hash" value="<?php echo $hash; ?>">
</form>
</body>
</html>

View File

@@ -81,7 +81,7 @@ 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"'; ?> 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.queryframe.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>
@@ -297,7 +297,7 @@ if (!isset($is_inside_querywindow) ||
?>
<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 addslashes($strInsertTextfiles); ?></a></div>');
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.queryframe.document.hashform.hash.value + \'.location.href = \\\'' . $ldi_target . '\\\'; return false;"' : ''); ?>><?php echo addslashes($strInsertTextfiles); ?></a></div>');
</script>
<?php