Bug #942296 - Safari can't handle location.replace() redirects

correctly
This commit is contained in:
Garvin Hicking
2004-04-28 12:13:36 +00:00
parent 40726ea672
commit 8cc4bd7fa4
6 changed files with 30 additions and 9 deletions

View File

@@ -11,6 +11,9 @@ $Source$
any (bug #943626). any (bug #943626).
2004-04-28 Garvin Hicking <pma@supergarv.de> 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 * libraries/tbl_change.js: Restrict calendar to maximum values for
days/hours/minutes/seconds. days/hours/minutes/seconds.
* tbl_change.php: Bug #913600 - Made tabindex/id of multi-edit table * tbl_change.php: Bug #913600 - Made tabindex/id of multi-edit table

View File

@@ -54,7 +54,7 @@ if (!isset($message)) {
?> ?>
<script type="text/javascript" language="javascript1.2"> <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> </script>
<?php <?php

View File

@@ -219,14 +219,32 @@ PMA_setFontSizes();
<script type="text/javascript" language="javascript"> <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 <?php
if (isset($lightm_db) && !empty($lightm_db)) { 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 <?php
} elseif (isset($lightm_db)) { } 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 <?php
} }
?> ?>

View File

@@ -1312,7 +1312,7 @@ if ($is_minimum_common == FALSE) {
<!-- <!--
if (typeof(window.parent) != 'undefined' if (typeof(window.parent) != 'undefined'
&& typeof(window.parent.frames['nav']) != '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> </script>

View File

@@ -39,7 +39,7 @@ else if (isset($reload) && $reload) {
?> ?>
<script type="text/javascript" language="javascript1.2"> <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> </script>
<?php <?php

View File

@@ -21,7 +21,7 @@ require('./server_common.inc.php');
function reload_window(db) { function reload_window(db) {
if (typeof(window.parent) != 'undefined' if (typeof(window.parent) != 'undefined'
&& typeof(window.parent.frames['nav']) != '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']) . "'"); ?>);
} }
} }
//--> //-->