[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_0BETA2-1575-g728d5a1
Marc Delisle
lem9 at users.sourceforge.net
Tue Feb 1 19:03:37 CET 2011
The branch, master has been updated
via 728d5a15583edb9319574054a32063b955763686 (commit)
from b8f7b831ef3429877ffe51527963b13fe852354b (commit)
- Log -----------------------------------------------------------------
commit 728d5a15583edb9319574054a32063b955763686
Author: Marc Delisle <marc at infomarc.info>
Date: Tue Feb 1 13:02:51 2011 -0500
Conditional Ajax for DROP DATABASE
Remove duplicate logic for confirmations
-----------------------------------------------------------------------
Summary of changes:
db_operations.php | 2 +-
js/functions.js | 25 -------------------------
2 files changed, 1 insertions(+), 26 deletions(-)
diff --git a/db_operations.php b/db_operations.php
index 9280467..3e674cb 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -446,7 +446,7 @@ echo __('Remove database');
'db' => NULL,
);
?>
- <li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" onclick="return confirmLinkDropDB(this, '<?php echo PMA_jsFormat($this_sql_query); ?>')">
+ <li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'id="drop_db_anchor"' : ''); ?>>
<?php echo __('Drop the database (DROP)'); ?></a>
<?php echo PMA_showMySQLDocu('SQL-Syntax', 'DROP_DATABASE'); ?>
</li>
diff --git a/js/functions.js b/js/functions.js
index 74a4fb8..0a9624e 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -111,31 +111,6 @@ function selectContent( element, lock, only_once ) {
}
/**
- * 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
*
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list