views_handler_argument_term_node_tid_depth_modifier.inc in Views (for Drupal 7) 6.2
File
modules/taxonomy/views_handler_argument_term_node_tid_depth_modifier.inc
View source
<?php
class views_handler_argument_term_node_tid_depth_modifier extends views_handler_argument {
function options_form(&$form, &$form_state) {
}
function query() {
}
function pre_query() {
$argument = isset($this->view->args[$this->position]) ? $this->view->args[$this->position] : NULL;
if (!is_numeric($argument)) {
return;
}
if ($argument > 10) {
$argument = 10;
}
if ($argument < -10) {
$argument = -10;
}
$keys = array_reverse(array_keys($this->view->argument));
$skip = TRUE;
foreach ($keys as $key) {
if ($key == $this->options['id']) {
$skip = FALSE;
continue;
}
if ($skip) {
continue;
}
if (empty($this->view->argument[$key])) {
continue;
}
if (isset($handler)) {
unset($handler);
}
$handler =& $this->view->argument[$key];
if (empty($handler->definition['accept depth modifier'])) {
continue;
}
$handler->options['depth'] = $argument;
}
}
}