You are here

function views_handler_argument_term_edge_node_tid_depth::query in Taxonomy Edge 8

Same name and namespace in other branches
  1. 6 views_taxonomy_edge/handlers/views_handler_argument_term_edge_node_tid_depth.inc \views_handler_argument_term_edge_node_tid_depth::query()
  2. 7.2 views_taxonomy_edge/handlers/views_handler_argument_term_edge_node_tid_depth.inc \views_handler_argument_term_edge_node_tid_depth::query()
  3. 7 views_taxonomy_edge/handlers/views_handler_argument_term_edge_node_tid_depth.inc \views_handler_argument_term_edge_node_tid_depth::query()

File

views_taxonomy_edge/handlers/views_handler_argument_term_edge_node_tid_depth.inc, line 13
This file is a copy/override of the default views taxonomy argument handler.

Class

views_handler_argument_term_edge_node_tid_depth
@file

Code

function query($group_by = FALSE) {
  if ($this->options['depth'] == 'all') {
    $this->options['depth'] = db_query("SELECT MAX(distance) FROM {taxonomy_term_edge} WHERE parent = 0")
      ->fetchField();
  }
  elseif ($this->options['depth'] == 'root') {
    $this->options['depth'] = -db_query("SELECT MAX(distance) FROM {taxonomy_term_edge} WHERE parent = 0")
      ->fetchField();
  }
  return parent::query($group_by);
}