apachesolr_views_handler_filter_author.inc in Apache Solr Views 6
File
handlers/apachesolr_views_handler_filter_author.inc
View source
<?php
class apachesolr_views_handler_filter_author extends views_handler_filter_user_name {
public function query() {
$not = $this->operator == 'not in';
$uids = $this->value;
if (empty($uids) && ($this->options['exposed'] && empty($this->options['expose']['optional']))) {
if (!$not) {
$this->query
->add_filter('nid', apachesolr_views_query::escape_term('-1'));
}
}
else {
foreach ($uids as $uid) {
$filter_string .= " OR {$uid}";
}
$filter_string = substr($filter_string, 4);
$filter_string = "({$filter_string})";
$this->query
->add_filter('uid', $filter_string, $not);
}
}
}