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:
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'];
+ }
}
}