Conditional Ajax for DROP DATABASE

Remove duplicate logic for confirmations
This commit is contained in:
Marc Delisle
2011-02-01 13:02:51 -05:00
parent b8f7b831ef
commit 728d5a1558
2 changed files with 1 additions and 26 deletions

View File

@@ -110,31 +110,6 @@ function selectContent( element, lock, only_once ) {
element.select();
}
/**
* Displays a confirmation box before submitting a "DROP DATABASE" query.
* This function is called while clicking links
*
* @param object the link
* @param object the sql query to submit
*
* @return boolean whether to run the query or not
*/
function confirmLinkDropDB(theLink, theSqlQuery)
{
// Confirmation is not required in the configuration file
// or browser is Opera (crappy js implementation)
if (PMA_messages['strDoYouReally'] == '' || typeof(window.opera) != 'undefined') {
return true;
}
var is_confirmed = confirm(PMA_messages['strDropDatabaseStrongWarning'] + '\n' + PMA_messages['strDoYouReally'] + ' :\n' + theSqlQuery);
if (is_confirmed) {
theLink.href += '&is_js_confirmed=1';
}
return is_confirmed;
} // end of the 'confirmLinkDropDB()' function
/**
* Displays a confirmation box before to submit a "DROP/DELETE/ALTER" query.
* This function is called while clicking links