You are here

public function revisioning_handler_field_revision_state::pre_query in Revisioning 7

Same name and namespace in other branches
  1. 8 views/revisioning_handler_field_revision_state.inc \revisioning_handler_field_revision_state::pre_query()

Modify the query before it's executed.

Overrides views_handler::pre_query

File

views/revisioning_handler_field_revision_state.inc, line 32
Handler for the 'Node revision: state' field.

Class

revisioning_handler_field_revision_state
@file Handler for the 'Node revision: state' field.

Code

public function pre_query() {
  $this->_node_based = $this->view->base_table == 'node' || !empty($this->options['relationship']) && $this->options['relationship'] !== 'none';
  if ($this->_node_based) {
    $this->additional_fields['published'] = array(
      'table' => 'node',
      'field' => 'status',
    );
    $this->additional_fields['current_vid'] = array(
      'table' => 'node',
      'field' => 'vid',
    );
  }
}