You are here

function views_handler_filter_watchdog_message::_query in Views Watchdog 7.3

Same name and namespace in other branches
  1. 6.3 views/handlers/views_handler_filter_watchdog_message.inc \views_handler_filter_watchdog_message::_query()
  2. 6.2 views/handlers/views_handler_filter_watchdog_message.inc \views_handler_filter_watchdog_message::_query()

File

views/handlers/views_handler_filter_watchdog_message.inc, line 42
Views filter handler for the views_watchdog module.

Class

views_handler_filter_watchdog_message
Provides message filter options for the watchdog entry.

Code

function _query() {
  $this
    ->ensure_my_table();
  $field_message = "{$this->table_alias}.{$this->real_field}";
  $field_variables = "{$this->table_alias}.{$this->additional_search_field}";
  $info = $this
    ->operators();
  if (!empty($info[$this->operator]['method'])) {

    // Search in database field message
    $this
      ->{$info[$this->operator]['method']}($field_message);
    if (!empty($this->options['watchdog_message_search_variables'])) {

      // Search also in database field variables
      $this
        ->{$info[$this->operator]['method']}($field_variables);
      $this->query
        ->set_where_group('OR', $this->options['group']);
    }
  }
}