Merge pull request #153 from lem9/bug_3784
Bug #3784 Disabling "Confirm DROP queries" in user preferences does not ...
This commit is contained in:
commit
22f4623ae3
@ -1890,6 +1890,17 @@ function PMA_SQLPrettyPrint(string)
|
||||
*/
|
||||
|
||||
jQuery.fn.PMA_confirm = function(question, url, callbackFn) {
|
||||
var confirmState = PMA_commonParams.get('confirm');
|
||||
// when the Confirm directive is set to false in config.inc.php
|
||||
// and not changed in user prefs, confirmState is ""
|
||||
// when it's unticked in user prefs, confirmState is 1
|
||||
if (confirmState === "" || confirmState === "1") {
|
||||
// user does not want to confirm
|
||||
if ($.isFunction(callbackFn)) {
|
||||
callbackFn.call(this, url);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (PMA_messages['strDoYouReally'] == '') {
|
||||
return true;
|
||||
}
|
||||
@ -3823,4 +3834,4 @@ AJAX.registerOnload('functions.js', function () {
|
||||
$('a.login-link').live('click', function(e) {
|
||||
e.preventDefault();
|
||||
window.location.reload(true);
|
||||
});
|
||||
});
|
||||
|
||||
@ -219,7 +219,8 @@ class PMA_Header
|
||||
),
|
||||
'pma_text_left_default_tab' => PMA_Util::getTitleForTarget(
|
||||
$GLOBALS['cfg']['NavigationTreeDefaultTabTable']
|
||||
)
|
||||
),
|
||||
'confirm' => $GLOBALS['cfg']['Confirm']
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user