summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-10-18 11:46:18 +0000
committerDries Buytaert <dries@buytaert.net>2006-10-18 11:46:18 +0000
commitd7705ea68366da63286df16dd2d10f6198cd0831 (patch)
treee0e15a9fdb3743b67c0c5dba3f98739cb987aa45 /modules/user/user.module
parent91fa9127472e40c9c5e02091ed0ca4edd482975f (diff)
downloadbrdo-d7705ea68366da63286df16dd2d10f6198cd0831.tar.gz
brdo-d7705ea68366da63286df16dd2d10f6198cd0831.tar.bz2
- Patch #89356 by RobRoy: only show labels when necessary.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module20
1 files changed, 11 insertions, 9 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 8bd18d43d..3f9c7652b 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -2118,16 +2118,18 @@ function user_user_operations() {
$remove_roles['remove_role-'. $key] = $value;
}
- $role_operations = array(
- t('Add a role to the selected users') => array(
- 'label' => $add_roles,
- ),
- t('Remove a role from the selected users') => array(
- 'label' => $remove_roles,
- ),
- );
+ if (count($roles)) {
+ $role_operations = array(
+ t('Add a role to the selected users') => array(
+ 'label' => $add_roles,
+ ),
+ t('Remove a role from the selected users') => array(
+ 'label' => $remove_roles,
+ ),
+ );
- $operations += $role_operations;
+ $operations += $role_operations;
+ }
}
// If the form has been posted, we need to insert the proper data for role editing if necessary.