summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc
diff options
context:
space:
mode:
authorTorsten Grote <grote@kolabsys.com>2012-08-27 12:47:35 (GMT)
committerTorsten Grote <grote@kolabsys.com>2012-08-27 12:47:35 (GMT)
commit7b5e4a2b04e4fb38485bc12965e07794388d0224 (patch)
tree42031777dcb7476a63e9d6080ab9b8eef8ebb6f0 /kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc
parentee39408867ae52c2321036a67c472e684c1e1108 (diff)
downloadkolab.org-www-7b5e4a2b04e4fb38485bc12965e07794388d0224.tar.gz
updated ctools, ldap and views modules
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc
index f556107..e6571cd 100644
--- a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/user/views_handler_field_user_roles.inc
@@ -1,4 +1,10 @@
<?php
+
+/**
+ * @file
+ * Definition of views_handler_field_user_roles.
+ */
+
/**
* Field handler to provide a list of roles.
*
@@ -43,7 +49,9 @@ class views_handler_field_user_roles extends views_handler_field_prerender_list
}
function add_self_tokens(&$tokens, $item) {
- $tokens['[' . $this->options['id'] . '-role' . ']'] = $item['role'];
- $tokens['[' . $this->options['id'] . '-rid' . ']'] = $item['rid'];
+ if (!empty($item['role'])) {
+ $tokens['[' . $this->options['id'] . '-role' . ']'] = $item['role'];
+ $tokens['[' . $this->options['id'] . '-rid' . ']'] = $item['rid'];
+ }
}
}