Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
bf92bfdf2a
@ -99,6 +99,7 @@ underscore
|
||||
+ Remove the database ordering sub-feature of the only_db directive
|
||||
- bug #3840 When exporting to gzip format, the data is compressed 2 times
|
||||
+ rfe #1319 Permit to create index when creating foreign key
|
||||
- bug #3703 Incorrect updating of the list of users
|
||||
|
||||
3.5.8.0 (not yet released)
|
||||
- bug #3828 MariaDB reported as MySQL
|
||||
|
||||
@ -375,6 +375,23 @@ AJAX.registerOnload('server_privileges.js', function() {
|
||||
*/
|
||||
var curr_submit_value = $t.find('.tblFooters').find('input:submit').val();
|
||||
|
||||
// If any option other than 'keep the old one'(option 4) is chosen, we need to remove
|
||||
// the old one from the table.
|
||||
var $row_to_remove;
|
||||
if (curr_submit_name == 'change_copy'
|
||||
&& $('input[name=mode]:checked', '#fieldset_mode').val() != '4') {
|
||||
var old_username = $t.find('input[name="old_username"]').val();
|
||||
var old_hostname = $t.find('input[name="old_hostname"]').val();
|
||||
$('#usersForm tbody tr').each(function() {
|
||||
var $tr = $(this);
|
||||
if ($tr.find('td:nth-child(2) label').text() == old_username
|
||||
&& $tr.find('td:nth-child(3)').text() == old_hostname) {
|
||||
$row_to_remove = $tr;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$.post($t.attr('action'), $t.serialize() + '&' + curr_submit_name + '=' + curr_submit_value, function(data) {
|
||||
if (data.success == true) {
|
||||
$('#page_content').show();
|
||||
@ -394,6 +411,11 @@ AJAX.registerOnload('server_privileges.js', function() {
|
||||
}
|
||||
} //Show SQL Query that was executed
|
||||
|
||||
// Remove the old row if the old user is deleted
|
||||
if ($row_to_remove != null) {
|
||||
$row_to_remove.remove();
|
||||
}
|
||||
|
||||
//Append new user if necessary
|
||||
if (data.new_user_string) {
|
||||
appendNewUser(data.new_user_string, data.new_user_initial, data.new_user_initial_string);
|
||||
|
||||
@ -1937,7 +1937,7 @@ function PMA_getChangeLoginInformationHtmlForm($username, $hostname)
|
||||
. '</legend>' . "\n"
|
||||
. PMA_getHtmlForDisplayLoginInformationFields('change');
|
||||
|
||||
$html_output .= '<fieldset>' . "\n"
|
||||
$html_output .= '<fieldset id="fieldset_mode">' . "\n"
|
||||
. ' <legend>'
|
||||
. __('Create a new user with the same privileges and …')
|
||||
. '</legend>' . "\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user