diff --git a/include/ajax.search.php b/include/ajax.search.php index 5ab4feeab0982581295ade316cde365b76cb3f4b..2fd01bfe988224d18a18ff6da0ccce33d90efdbf 100644 --- a/include/ajax.search.php +++ b/include/ajax.search.php @@ -337,12 +337,9 @@ class SearchAjaxAPI extends AjaxController { foreach ($queues as $queue) { $Q = $queue->getBasicQuery(); if (count($Q->extra) || $Q->isWindowed()) { - // Nothing extra in the select clause, or this will break - unset($Q->extra['select']); // XXX: This doesn't work $query->annotate(array( 'q'.$queue->id => $Q->values_flat() - ->filter(array('ticket_id' => new SqlField('ticket_id', 1))) ->aggregate(array('count' => SqlAggregate::COUNT('ticket_id'))) )); } diff --git a/include/class.search.php b/include/class.search.php index 5435c7cd5a268237213a2618710dc49e4b065ef2..a203040185a42900a8f75a9f771862b0e2007e32 100644 --- a/include/class.search.php +++ b/include/class.search.php @@ -1163,7 +1163,7 @@ class SavedSearch extends VerySimpleModel { // Consider keyword searching if ($name === ':keywords') { global $ost; - $qs = $ost->searcher->find($value, $qs); + $qs = $ost->searcher->find($value, $qs, false); } else { // XXX: Move getOrmPath to be more of a utility