You are here

public function views_handler_filter_node_version_count::op_empty in Views (for Drupal 7) 7.3

Overrides views_handler_filter_numeric::op_empty

File

modules/node/views_handler_filter_node_version_count.inc, line 37
Definition of views_handler_filter_node_version_count.

Class

views_handler_filter_node_version_count
Filter to handle dates stored as a timestamp.

Code

public function op_empty($field) {
  if ($this->operator == 'empty') {
    $operator = "IS NULL";
  }
  else {
    $operator = "IS NOT NULL";
  }
  $this->query
    ->add_where_expression($this->options['group'], '(SELECT COUNT(vid) FROM {node_revision} WHERE nid = {' . $this->table_alias . '}.nid) ' . $this->operator);
}