Commit 60688438 authored by Evan Prodromou's avatar Evan Prodromou

Show both empty and full notice search results inside event wrapper

parent 239d9217
......@@ -132,11 +132,10 @@ class NoticesearchAction extends SearchAction
*/
function showResults($q, $page)
{
if (Event::handle('StartNoticeSearchShowResults', array($this, $q, $this->notice))) {
if ($this->notice->N === 0) {
$this->showEmptyResults($q, $page);
}
if (Event::handle('StartNoticeSearchShowResults', array($this, $q, $this->notice))) {
} else {
$terms = preg_split('/[\s,]+/', $q);
$nl = new SearchNoticeList($this->notice, $this, $terms);
$cnt = $nl->show();
......@@ -145,6 +144,7 @@ class NoticesearchAction extends SearchAction
$page,
'noticesearch',
array('q' => $q));
}
Event::handle('EndNoticeSearchShowResults', array($this, $q, $this->notice));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment