function smartqueue_domain_handler_filter_in_domain::query in Smartqueue Domain 7
Add this filter to the query.
Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.
Overrides views_handler_filter_boolean_operator::query
File
- ./
smartqueue_domain_handler_filter_in_domain.inc, line 7 - Handler to filter for nodes that are not in a queue.
Class
- smartqueue_domain_handler_filter_in_domain
- @file Handler to filter for nodes that are not in a queue.
Code
function query() {
$this
->ensure_my_table();
$extras = $this->query->table_queue['nodequeue_nodes_node']['join']->extra;
if (is_array($extras)) {
foreach ($extras as $extra) {
if ($extra['field'] == 'qid') {
$qid = $extra['value'];
}
}
}
$subqueues = nodequeue_load_subqueues_by_queue($qid);
$sqid = array();
foreach ($subqueues as $subqueue) {
if (smartqueue_domain_views_check_subqueue($subqueue)) {
$sqid[] = $subqueue->sqid;
}
}
if (!empty($sqid)) {
$this->query
->add_where($this->options['group'], $this->table_alias . ".sqid", $sqid, $this->value ? "IN" : "NOT IN");
}
}