Merge branch 'QA_4_6'

This commit is contained in:
Michal Čihař 2016-12-01 11:36:22 +01:00
commit f4d8f6c151
2 changed files with 6 additions and 3 deletions

View File

@ -41,6 +41,7 @@ phpMyAdmin - ChangeLog
- issue #12760 Fix Notice regarding 'Undefined index: users'
- issue #12762 Fixed parsing of SQL with BINARY function
- issue #12588 ReCaptcha now works without allow_url_fopen
- issue #12699 Show no local storage warning only on settings tab
4.6.5.1 (2016-11-25)
- issue #12735 Incorrect parameters to escapeString in Node.php

View File

@ -10,7 +10,7 @@
*
* @returns bool
*/
function isStorageSupported(type)
function isStorageSupported(type, warn)
{
try {
window[type].setItem('PMATest', 'test');
@ -22,7 +22,9 @@ function isStorageSupported(type)
}
} catch(error) {
// Not supported
PMA_ajaxShowMessage(PMA_messages.strNoLocalStorage, false);
if (warn) {
PMA_ajaxShowMessage(PMA_messages.strNoLocalStorage, false);
}
}
return false;
}
@ -740,7 +742,7 @@ AJAX.registerOnload('config.js', function () {
});
// detect localStorage state
var ls_supported = isStorageSupported('localStorage');
var ls_supported = isStorageSupported('localStorage', true);
var ls_exists = ls_supported ? (window.localStorage.config || false) : false;
$('div.localStorage-' + (ls_supported ? 'un' : '') + 'supported').hide();
$('div.localStorage-' + (ls_exists ? 'empty' : 'exists')).hide();