[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_8-24689-g6a6b844

Rouslan Placella roccivic at users.sourceforge.net
Mon Dec 12 17:56:28 CET 2011


The branch, master has been updated
       via  6a6b844525a782b148f235a11b77712e1d256280 (commit)
      from  716b48ed78ab624f304272f3d8d4434b5336dfe0 (commit)


- Log -----------------------------------------------------------------
commit 6a6b844525a782b148f235a11b77712e1d256280
Author: Rouslan Placella <rouslan at placella.com>
Date:   Mon Dec 12 16:55:30 2011 +0000

    Fixed bug #3442069 - database list not updated after adding a user + database

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog               |    1 +
 js/server_privileges.js |   14 ++++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fb00e58..77ebdcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,7 @@ phpMyAdmin - ChangeLog
 + View editing via a generated ALTER VIEW
 - bug #3408377 [interface] Deleting table from the DB does not change the table counter
 + rfe #3438266 [designer] Toggle for relation lines
+- bug #3442069 [AJAX] database list not updated after adding/deleting a user + database
 
 3.4.9.0 (not yet released)
 - bug #3442028 [edit] Inline editing enum fields with null shows no dropdown
diff --git a/js/server_privileges.js b/js/server_privileges.js
index 6b9e622..db8239d 100644
--- a/js/server_privileges.js
+++ b/js/server_privileges.js
@@ -185,6 +185,12 @@ $(document).ready(function() {
             //We also need to post the value of the submit button in order to get this to work correctly
             $.post($form.attr('action'), $form.serialize() + "&adduser_submit=" + $(this).find("input[name=adduser_submit]").attr('value'), function(data) {
                 if (data.success == true) {
+                    // Refresh navigation, if we created a database with the name
+                    // that is the same as the username of the new user
+                    if ($('#add_user_dialog #createdb_1:checked').length && window.parent) {
+                        window.parent.refreshNavigation(true);
+                    }
+
                     $("#add_user_dialog").dialog("close");
                     PMA_ajaxShowMessage(data.message);
                     $("#floating_menubar")
@@ -225,7 +231,7 @@ $(document).ready(function() {
                                      .html(priv_data.user_form)
                                      .insertAfter('#result_query');
                                 } else {
-                                    PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + priv_data.error, "7000");
+                                    PMA_ajaxShowMessage(PMA_messages['strErrorProcessingRequest'] + " : " + priv_data.error, false);
                                 }
                             } else {
                                 /*parse the JSON string*/
@@ -315,7 +321,11 @@ $(document).ready(function() {
         $.post($form.attr('action'), $form.serialize() + "&delete=" + $(this).attr('value') + "&ajax_request=true", function(data) {
             if(data.success == true) {
                 PMA_ajaxShowMessage(data.message);
-
+                // Refresh navigation, if we droppped some databases with the name
+                // that is the same as the username of the deleted user
+                if ($('#checkbox_drop_users_db:checked').length && window.parent) {
+                    window.parent.refreshNavigation(true);
+                }
                 //Remove the revoked user from the users list
                 $form.find("input:checkbox:checked").parents("tr").slideUp("medium", function() {
                     var this_user_initial = $(this).find('input:checkbox').val().charAt(0).toUpperCase();


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list