syncronize id and name attribute for frame tags but keep IE sending querywindow form to the correct window (bug #1374757, #1364470, #1297985)

This commit is contained in:
Sebastian Mendel
2005-12-07 22:59:37 +00:00
parent 59361bb98f
commit 8444d62a58
3 changed files with 9 additions and 12 deletions

View File

@@ -6,7 +6,6 @@
* *
* @uses libraries/common.lib.php global fnctions * @uses libraries/common.lib.php global fnctions
* @uses libraries/relation.lib.php table relations * @uses libraries/relation.lib.php table relations
* @uses $_SESSION['window_name_hash'] to set it
* @uses $GLOBALS['strNoFrames'] * @uses $GLOBALS['strNoFrames']
* @uses $GLOBALS['cfg']['QueryHistoryDB'] * @uses $GLOBALS['cfg']['QueryHistoryDB']
* @uses $GLOBALS['cfg']['Server']['user'] * @uses $GLOBALS['cfg']['Server']['user']
@@ -41,9 +40,6 @@ require_once('./libraries/common.lib.php');
*/ */
require_once('./libraries/relation.lib.php'); require_once('./libraries/relation.lib.php');
// hash for the window names, against window hijacking
$_SESSION['window_name_hash'] = time();
// free the session file, for the other frames to be loaded // free the session file, for the other frames to be loaded
session_write_close(); session_write_close();
@@ -143,12 +139,12 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']);
</script> </script>
</head> </head>
<frameset cols="<?php echo $GLOBALS['cfg']['LeftWidth']; ?>,*" rows="*" id="mainFrameset"> <frameset cols="<?php echo $GLOBALS['cfg']['LeftWidth']; ?>,*" rows="*" id="mainFrameset">
<frame frameborder="0" id="leftFrame" <frame frameborder="0" id="frame_navigation"
src="left.php<?php echo $url_query; ?>" src="left.php<?php echo $url_query; ?>"
name="nav<?php echo $_SESSION['window_name_hash']; ?>" /> name="frame_navigation" />
<frame frameborder="0" id="rightFrame" <frame frameborder="0" id="frame_content"
src="<?php echo $main_target; ?>" src="<?php echo $main_target; ?>"
name="phpmain<?php echo $_SESSION['window_name_hash']; ?>" /> name="frame_content" />
<noframes> <noframes>
<body> <body>
<p><?php echo $GLOBALS['strNoFrames']; ?></p> <p><?php echo $GLOBALS['strNoFrames']; ?></p>

View File

@@ -74,7 +74,7 @@ echo "<?xml version=\"1.0\" encoding=\"" . $GLOBALS['charset'] . "\"?".">";
<meta http-equiv="Content-Type" <meta http-equiv="Content-Type"
content="text/html; charset=<?php echo $charset; ?>" /> content="text/html; charset=<?php echo $charset; ?>" />
<base href="<?php echo $GLOBALS['cfg']['PmaAbsoluteUri']; ?>" <base href="<?php echo $GLOBALS['cfg']['PmaAbsoluteUri']; ?>"
target="phpmain<?php echo $_SESSION['window_name_hash']; ?>" /> target="frame_content" />
<link rel="stylesheet" type="text/css" <link rel="stylesheet" type="text/css"
href="./css/phpmyadmin.css.php?<?php echo PMA_generate_common_url( '', '' ); ?>&amp;js_frame=left" /> href="./css/phpmyadmin.css.php?<?php echo PMA_generate_common_url( '', '' ); ?>&amp;js_frame=left" />
<script type="text/javascript" language="javascript"> <script type="text/javascript" language="javascript">

View File

@@ -101,10 +101,11 @@ function PMA_sqlQueryForm( $query = true, $display_tab = false ) {
// start output // start output
if ( $is_querywindow ) { if ( $is_querywindow ) {
?> ?>
<form method="post" id="sqlqueryform" <form method="post" id="sqlqueryform" target="frame_content"
target="phpmain<?php echo md5( $GLOBALS['cfg']['PmaAbsoluteUri'] ); ?>"
action="import.php"<?php echo $enctype; ?> name="sqlform" action="import.php"<?php echo $enctype; ?> name="sqlform"
onsubmit="this.target=window.opener.frames[1].name; onsubmit="save_name = window.opener.parent.frames[1].name;
window.opener.parent.frames[1].name = save_name + '<?php echo time(); ?>';
this.target = window.opener.parent.frames[1].name;
return checkSqlQuery( this );" > return checkSqlQuery( this );" >
<?php <?php
} else { } else {