summaryrefslogtreecommitdiff
path: root/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc
diff options
context:
space:
mode:
Diffstat (limited to 'kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc')
-rw-r--r--kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc
new file mode 100644
index 0000000..6892fed
--- /dev/null
+++ b/kolab.org/www/drupal-7.15/sites/all/modules/views/modules/comment/views_handler_field_node_comment.inc
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * Display node comment status.
+ *
+ * @ingroup views_field_handlers
+ */
+class views_handler_field_node_comment extends views_handler_field {
+ function render($values) {
+ $value = $this->get_value($values);
+ switch ($value) {
+ case COMMENT_NODE_HIDDEN:
+ default:
+ return t('Hidden');
+ case COMMENT_NODE_CLOSED:
+ return t('Closed');
+ case COMMENT_NODE_OPEN:
+ return t('Open');
+ }
+ }
+}