diff --git a/libraries/server_privileges.lib.php b/libraries/server_privileges.lib.php
index 8e4752972e..18a1f6cf1d 100644
--- a/libraries/server_privileges.lib.php
+++ b/libraries/server_privileges.lib.php
@@ -2232,6 +2232,23 @@ function PMA_getUserExportLink($username, $hostname, $initial = '')
. '';
}
+/**
+ * Returns user group edit link
+ *
+ * @param string $username User name
+ *
+ * @return HTML code with link
+ */
+function PMA_getUserGroupEditLink($username)
+{
+ return ''
+ . PMA_Util::getIcon('b_usrlist.png', __('Edit user group'))
+ . '';
+}
+
/**
* This function return the extra data array for the ajax behavior
*
@@ -2291,7 +2308,14 @@ function PMA_getExtraDataForAjaxBehavior(
$new_user_string .= '
'
. '' . join(', ', PMA_extractPrivInfo('', true)) . ''
. ' | '; //Fill in privileges here
- $new_user_string .= ' | ';
+
+ // if $cfg['Servers'][$i]['users'] and $cfg['Servers'][$i]['usergroups'] are
+ // enabled
+ $cfgRelation = PMA_getRelationsParam();
+ if (isset($cfgRelation['users']) && isset($cfgRelation['usergroups'])) {
+ $new_user_string .= ' | ';
+ }
+
$new_user_string .= '';
if ((isset($_POST['Grant_priv']) && $_POST['Grant_priv'] == 'Y')) {
@@ -2305,6 +2329,13 @@ function PMA_getExtraDataForAjaxBehavior(
$new_user_string .= ' | '
. PMA_getUserEditLink($username, $hostname)
. ' | ' . "\n";
+
+ if (isset($cfgRelation['users']) && isset($cfgRelation['usergroups'])) {
+ $new_user_string .= ''
+ . PMA_getUserGroupEditLink($username)
+ . ' | ' . "\n";
+ }
+
$new_user_string .= ''
. PMA_getUserExportLink(
$username,
@@ -2975,13 +3006,8 @@ function PMA_getTableBodyForUserRightsTable($db_rights)
$html_output .= ' | | ';
} else {
$html_output .= ''
- . ''
- . PMA_Util::getIcon('b_usrlist.png', __('Edit user group'))
- . ''
- . ' | ';
+ . PMA_getUserGroupEditLink($host['User'])
+ .'';
}
}
$html_output .= ''
|