Reenable bookmarking code.
Just disable it for webkit based browsers, because they do not allow to update any part of location without reload. bug#2937481
This commit is contained in:
@@ -34,7 +34,7 @@ if (function_exists('mcrypt_encrypt')) {
|
||||
if (empty($_COOKIE['pma_mcrypt_iv'])
|
||||
|| false === ($iv = base64_decode($_COOKIE['pma_mcrypt_iv'], true))) {
|
||||
srand((double) microtime() * 1000000);
|
||||
$td = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, '');
|
||||
$td = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, '');
|
||||
if ($td === false) {
|
||||
trigger_error(PMA_sanitize(sprintf($strCantLoad, 'mcrypt')), E_USER_WARNING);
|
||||
}
|
||||
@@ -95,7 +95,7 @@ if (function_exists('mcrypt_encrypt')) {
|
||||
function PMA_get_blowfish_secret() {
|
||||
if (empty($GLOBALS['cfg']['blowfish_secret'])) {
|
||||
if (empty($_SESSION['auto_blowfish_secret'])) {
|
||||
// this returns 23 characters
|
||||
// this returns 23 characters
|
||||
$_SESSION['auto_blowfish_secret'] = uniqid('', true);
|
||||
}
|
||||
return $_SESSION['auto_blowfish_secret'];
|
||||
@@ -186,17 +186,14 @@ function PMA_auth()
|
||||
$page_title = 'phpMyAdmin ';
|
||||
require './libraries/header_meta_style.inc.php';
|
||||
?>
|
||||
<script src="./js/mootools.js" type="text/javascript"></script>
|
||||
<script src="./js/helper.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
// show login form in top frame
|
||||
if (top != self) {
|
||||
window.top.location.href=location;
|
||||
}
|
||||
// Restore location from hash for bookmarks
|
||||
|
||||
if (parent.location.hash != '') {
|
||||
parent.location = 'index.php?' + parent.location.hash.substring(1);
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
|
@@ -546,6 +546,7 @@ $_REQUEST['js_frame'] = PMA_ifSetOr($_REQUEST['js_frame'], '');
|
||||
*/
|
||||
$GLOBALS['js_include'] = array();
|
||||
$GLOBALS['js_include'][] = 'mootools.js';
|
||||
$GLOBALS['js_include'][] = 'helper.js';
|
||||
|
||||
/**
|
||||
* holds locale messages required by JavaScript function
|
||||
|
@@ -154,6 +154,7 @@ if (window.parent.frame_content) {
|
||||
//window.parent.frame_content.setAttribute('name', 'frame_content');
|
||||
//window.parent.frame_content.setAttribute('id', 'frame_content');
|
||||
}
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
@@ -166,10 +167,16 @@ if (!isset($GLOBALS['checked_special'])) {
|
||||
if (PMA_getenv('SCRIPT_NAME') && empty($_POST) && !$GLOBALS['checked_special']) {
|
||||
echo '<div id="selflink" class="print_ignore">' . "\n";
|
||||
$url_params['target'] = basename(PMA_getenv('SCRIPT_NAME'));
|
||||
/* Store current location in hash part of URL to allow direct bookmarking */
|
||||
// Disabled for now, causes infinite loop with some Chrome based browsers
|
||||
// Should be converted to use mootools and onload event
|
||||
//echo '<script>parent.location.hash = "' . PMA_generate_common_url($url_params, 'text', '') . '";</script>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||
/* Store current location in hash part of URL to allow direct bookmarking */
|
||||
setURLHash("<?php echo PMA_generate_common_url($url_params, 'text', ''); ?>");
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
|
||||
echo '<a href="index.php' . PMA_generate_common_url($url_params) . '"'
|
||||
. ' title="' . $GLOBALS['strOpenNewWindow'] . '" target="_blank">';
|
||||
|
Reference in New Issue
Block a user