Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -389,8 +389,18 @@ $(document).ready(function() {
|
||||
appendNewUser(data.new_user_string, data.new_user_initial, data.new_user_initial_string);
|
||||
}
|
||||
|
||||
//Change privileges if they were edited
|
||||
if(data.new_privileges) {
|
||||
//Check if we are on the page of the db-specific privileges
|
||||
var db_priv_page = !!($('#dbspecificuserrights').length); // the "!!" part is merely there to ensure a value of type boolean
|
||||
// we always need to reload on the db-specific privilege page
|
||||
// and on the global page when adjusting global privileges,
|
||||
// but not on the global page when adjusting db-specific privileges.
|
||||
var reload_privs = false;
|
||||
if (data.db_specific_privs == false || (db_priv_page == data.db_specific_privs)) {
|
||||
reload_privs = true;
|
||||
}
|
||||
|
||||
//Change privileges, if they were edited and need to be reloaded
|
||||
if(data.new_privileges && reload_privs) {
|
||||
$("#usersForm")
|
||||
.find('.current_row')
|
||||
.find('tt')
|
||||
|
@@ -1440,6 +1440,10 @@ if( $GLOBALS['is_ajax_request'] && !isset($_REQUEST['export']) && !isset($_REQUE
|
||||
}
|
||||
|
||||
if(isset($update_privs)) {
|
||||
$extra_data['db_specific_privs'] = false;
|
||||
if (isset($dbname_is_wildcard)) {
|
||||
$extra_data['db_specific_privs'] = !$dbname_is_wildcard;
|
||||
}
|
||||
$new_privileges = join(', ', PMA_extractPrivInfo('', true));
|
||||
|
||||
$extra_data['new_privileges'] = $new_privileges;
|
||||
@@ -2161,7 +2165,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
|
||||
. '</form>' . "\n";
|
||||
} else {
|
||||
// check the privileges for a particular database.
|
||||
echo '<form id="usersForm"><table id="tablespecificuserrights" class="data">' . "\n"
|
||||
echo '<form id="usersForm"><table id="dbspecificuserrights" class="data">' . "\n"
|
||||
. '<caption class="tblHeaders">' . "\n"
|
||||
. PMA_getIcon('b_usrcheck.png')
|
||||
. ' ' . sprintf(__('Users having access to "%s"'), '<a href="' . $GLOBALS['cfg']['DefaultTabDatabase'] . '?' . PMA_generate_common_url($checkprivs) . '">' . htmlspecialchars($checkprivs) . '</a>') . "\n"
|
||||
|
Reference in New Issue
Block a user