diff --git a/ChangeLog b/ChangeLog index 437020aebf..b99004fea9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -77,6 +77,7 @@ phpMyAdmin - ChangeLog - issue #11953 Do not fail getting filename with open_basedir limitations - issue #11956 unrecognized keyword interval - issue Field names and aliases are being correctly parsed now. +- issue #11959 Fix javascript error in setup 4.5.4.1 (2016-01-29) - issue #11892 Error with PMA 4.4.15.3 diff --git a/js/config.js b/js/config.js index d3d5d71f23..43309b1b93 100644 --- a/js/config.js +++ b/js/config.js @@ -3,6 +3,30 @@ * Functions used in configuration forms and on user preferences pages */ +/** + * checks whether browser supports web storage + * + * @param type the type of storage i.e. localStorage or sessionStorage + * + * @returns bool + */ +function isStorageSupported(type) +{ + try { + window[type].setItem('PMATest', 'test'); + // Check whether key-value pair was set successfully + if (window[type].getItem('PMATest') === 'test') { + // Supported, remove test variable from storage + window[type].removeItem('PMATest'); + return true; + } + } catch(error) { + // Not supported + PMA_ajaxShowMessage(PMA_messages.strNoLocalStorage, false); + } + return false; +} + /** * Unbind all event handlers before tearing down a page */ diff --git a/js/functions.js b/js/functions.js index 0605c81c05..275466cc60 100644 --- a/js/functions.js +++ b/js/functions.js @@ -4855,30 +4855,6 @@ function PMA_ignorePhpErrors(clearPrevErrors){ $pmaErrors.remove(); } -/** - * checks whether browser supports web storage - * - * @param type the type of storage i.e. localStorage or sessionStorage - * - * @returns bool - */ -function isStorageSupported(type) -{ - try { - window[type].setItem('PMATest', 'test'); - // Check whether key-value pair was set successfully - if (window[type].getItem('PMATest') === 'test') { - // Supported, remove test variable from storage - window[type].removeItem('PMATest'); - return true; - } - } catch(error) { - // Not supported - PMA_ajaxShowMessage(PMA_messages.strNoLocalStorage, false); - } - return false; -} - /** * Unbind all event handlers before tearing down a page */ diff --git a/libraries/Header.php b/libraries/Header.php index d7a9d04332..488fdd80d5 100644 --- a/libraries/Header.php +++ b/libraries/Header.php @@ -195,12 +195,12 @@ class Header $this->_scripts->addFile( 'get_image.js.php?theme=' . $theme_id ); + $this->_scripts->addFile('config.js'); $this->_scripts->addFile('doclinks.js'); $this->_scripts->addFile('functions.js'); $this->_scripts->addFile('navigation.js'); $this->_scripts->addFile('indexes.js'); $this->_scripts->addFile('common.js'); - $this->_scripts->addFile('config.js'); $this->_scripts->addFile('page_settings.js'); $this->_scripts->addCode($this->getJsParamsCode()); }