function views_handler_filter_node_nid_php::query in Views PHP Filter 6
Same name and namespace in other branches
- 7 views_handler_filter_node_nid_php.inc \views_handler_filter_node_nid_php::query()
File
- ./
views_handler_filter_node_nid_php.inc, line 78
Class
Code
function query() {
if (($result = $this
->_parse_input($this->value)) === false) {
return;
}
$this
->ensure_my_table();
if ($this->operator == 'NAND') {
if (!(empty($result) || count($result) == 1 && $result[0] == NULL)) {
$this->query
->add_where($this->options['group'], "{$this->table_alias}.{$this->real_field} NOT IN (%s)", implode(",", $result));
}
}
else {
// $this->operator == 'AND'
if (empty($result) || count($result) == 1 && $result[0] == NULL) {
$this->query
->add_where($this->options['group'], "{$this->table_alias}.{$this->real_field} IS NULL");
}
else {
$this->query
->add_where($this->options['group'], "{$this->table_alias}.{$this->real_field} IN (%s)", implode(",", $result));
}
}
}