From ecc4913a8c83330d46fc6bc0c20f2a601c3918ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 25 Jan 2010 11:50:48 +0000 Subject: [PATCH] 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 --- index.php | 8 ++--- js/helper.js | 56 ++++++++++++++++++++++++++++++ libraries/auth/cookie.auth.lib.php | 11 +++--- libraries/common.inc.php | 1 + libraries/footer.inc.php | 15 +++++--- 5 files changed, 74 insertions(+), 17 deletions(-) create mode 100644 js/helper.js diff --git a/index.php b/index.php index 1361b5fc5..34842ec71 100644 --- a/index.php +++ b/index.php @@ -131,12 +131,6 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']); var pma_text_default_tab = ''; var pma_text_left_default_tab = ''; - // Restore location from hash for bookmarks - - if (parent.location.hash != '') { - parent.location = 'index.php?' + parent.location.hash.substring(1); - } - // for content and navigation frames var frame_content = 0; @@ -165,6 +159,8 @@ header('Content-Type: text/html; charset=' . $GLOBALS['charset']); }; // ]]> + + + + diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 9d406fd3c..11c5f8bd3 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -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 diff --git a/libraries/footer.inc.php b/libraries/footer.inc.php index 7005cc6a0..09f8d5cee 100644 --- a/libraries/footer.inc.php +++ b/libraries/footer.inc.php @@ -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'); } + //]]> ' . "\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 ''; + ?> + +';