views_handler_filter_node_status.inc

  1. 3.x modules/node/views_handler_filter_node_status.inc
  2. 2.x modules/node/views_handler_filter_node_status.inc

Definition of views_handler_filter_node_status.

File

modules/node/views_handler_filter_node_status.inc
View source
  1. <?php
  2. /**
  3. * @file
  4. * Definition of views_handler_filter_node_status.
  5. */
  6. /**
  7. * Filter by published status.
  8. *
  9. * @ingroup views_filter_handlers
  10. */
  11. class views_handler_filter_node_status extends views_handler_filter {
  12. function admin_summary() { }
  13. function operator_form(&$form, &$form_state) { }
  14. function can_expose() { return FALSE; }
  15. function query() {
  16. $table = $this->ensure_my_table();
  17. $this->query->add_where_expression($this->options['group'], "$table.status = 1 OR ($table.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0 AND ***VIEW_OWN_UNPUBLISHED_NODES*** = 1) OR ***BYPASS_NODE_ACCESS*** = 1");
  18. }
  19. }