Bug #942296 - Safari can't handle location.replace() redirects
correctly
This commit is contained in:
@@ -11,6 +11,9 @@ $Source$
|
||||
any (bug #943626).
|
||||
|
||||
2004-04-28 Garvin Hicking <pma@supergarv.de>
|
||||
* left.php, main.php, server_databases.php, common.lib.php,
|
||||
db_details_common.php: Bug #942296 - Safari can't handle
|
||||
location.replace() redirects correctly
|
||||
* libraries/tbl_change.js: Restrict calendar to maximum values for
|
||||
days/hours/minutes/seconds.
|
||||
* tbl_change.php: Bug #913600 - Made tabindex/id of multi-edit table
|
||||
|
@@ -54,7 +54,7 @@ if (!isset($message)) {
|
||||
?>
|
||||
<script type="text/javascript" language="javascript1.2">
|
||||
<!--
|
||||
window.parent.frames['nav'].location.replace('./left.php?<?php echo PMA_generate_common_url($db, '', '&'); ?>&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>);
|
||||
window.parent.frames['nav'].goTo('./left.php?<?php echo PMA_generate_common_url($db, '', '&'); ?>&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>);
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
|
22
left.php
22
left.php
@@ -219,14 +219,32 @@ PMA_setFontSizes();
|
||||
|
||||
<script type="text/javascript" language="javascript">
|
||||
<!--
|
||||
function goTo(targeturl, targetframe) {
|
||||
if (!targetframe || targetframe == '') {
|
||||
targetframe = self;
|
||||
}
|
||||
|
||||
alert('Changing location...');
|
||||
|
||||
if (targetframe) {
|
||||
<?php if (PMA_USR_BROWSER_AGENT != 'SAFARI') { ?>
|
||||
targetframe.location.replace(targeturl);
|
||||
<?php } else { ?>
|
||||
targetframe.location.href = targeturl;
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
<?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, '', '&');?>');
|
||||
goTo('./<?php echo $cfg['DefaultTabDatabase'] . '?' . PMA_generate_common_url($db, '', '&');?>', window.parent.frames['phpmain<?php echo $hash; ?>']);
|
||||
<?php
|
||||
} elseif (isset($lightm_db)) {
|
||||
?>
|
||||
window.parent.frames['phpmain<?php echo $hash; ?>'].location.replace('./main.php?<?php echo PMA_generate_common_url('', '', '&');?>');
|
||||
goTo('./main.php?<?php echo PMA_generate_common_url('', '', '&');?>', window.parent.frames['phpmain<?php echo $hash; ?>']);
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
@@ -1102,7 +1102,7 @@ if ($is_minimum_common == FALSE) {
|
||||
echo 'document.write (\'<p><a href="' . $uri . '">' . $GLOBALS['strGo'] . '</a></p>\');' . "\n";
|
||||
echo '</script></body></html>' . "\n";
|
||||
|
||||
} else {
|
||||
} else {
|
||||
header('Location: ' . $uri);
|
||||
}
|
||||
}
|
||||
@@ -1312,7 +1312,7 @@ if ($is_minimum_common == FALSE) {
|
||||
<!--
|
||||
if (typeof(window.parent) != 'undefined'
|
||||
&& typeof(window.parent.frames['nav']) != 'undefined') {
|
||||
window.parent.frames['nav'].location.replace('<?php echo $reload_url; ?>&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>);
|
||||
window.parent.frames['nav'].goTo('<?php echo $reload_url; ?>&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>);
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
6
main.php
6
main.php
@@ -39,7 +39,7 @@ else if (isset($reload) && $reload) {
|
||||
?>
|
||||
<script type="text/javascript" language="javascript1.2">
|
||||
<!--
|
||||
window.parent.frames['nav'].location.replace('./left.php?<?php echo PMA_generate_common_url('', '', '&');?>&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>););
|
||||
window.parent.frames['nav'].GoTo('./left.php?<?php echo PMA_generate_common_url('', '', '&');?>&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>););
|
||||
//-->
|
||||
</script>
|
||||
<?php
|
||||
@@ -239,7 +239,7 @@ if ($server > 0) {
|
||||
$db_to_create = '';
|
||||
break;
|
||||
} // end if
|
||||
else if ( (ereg($re0 . '%|_', $show_grants_dbname)
|
||||
else if ( (ereg($re0 . '%|_', $show_grants_dbname)
|
||||
&& !ereg('\\\\%|\\\\_', $show_grants_dbname))
|
||||
|| (!PMA_DBI_try_query('USE ' . ereg_replace($re1 .'(%|_)', '\\1\\3', $show_grants_dbname)) && substr(PMA_DBI_getError(), 1, 4) != 1044)
|
||||
) {
|
||||
@@ -314,7 +314,7 @@ if ($server > 0) {
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
|
||||
|
||||
<!-- db creation no privileges message -->
|
||||
<li>
|
||||
<?php echo $strCreateNewDatabase . ': ' . PMA_showMySQLDocu('Reference', 'CREATE_DATABASE'); ?><br />
|
||||
|
@@ -21,7 +21,7 @@ require('./server_common.inc.php');
|
||||
function reload_window(db) {
|
||||
if (typeof(window.parent) != 'undefined'
|
||||
&& typeof(window.parent.frames['nav']) != 'undefined') {
|
||||
window.parent.frames['nav'].location.replace('./left.php?<?php echo PMA_generate_common_url('','','&');?>&db=' + db + '&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>);
|
||||
window.parent.frames['nav'].goTo('./left.php?<?php echo PMA_generate_common_url('','','&');?>&db=' + db + '&hash=' + <?php echo (($cfg['QueryFrame'] && $cfg['QueryFrameJS']) ? 'window.parent.frames[\'queryframe\'].document.hashform.hash.value' : "'" . md5($cfg['PmaAbsoluteUri']) . "'"); ?>);
|
||||
}
|
||||
}
|
||||
//-->
|
||||
|
Reference in New Issue
Block a user