From 606884385c1f62e9e719fe337e0355dc56238b28 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 12 Apr 2011 14:29:12 -0400 Subject: [PATCH] Show both empty and full notice search results inside event wrapper --- actions/noticesearch.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/actions/noticesearch.php b/actions/noticesearch.php index 257a925835..d4fc884f4b 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -132,19 +132,19 @@ class NoticesearchAction extends SearchAction */ function showResults($q, $page) { - if ($this->notice->N === 0) { - $this->showEmptyResults($q, $page); - } - if (Event::handle('StartNoticeSearchShowResults', array($this, $q, $this->notice))) { - $terms = preg_split('/[\s,]+/', $q); - $nl = new SearchNoticeList($this->notice, $this, $terms); - $cnt = $nl->show(); - $this->pagination($page > 1, - $cnt > NOTICES_PER_PAGE, - $page, - 'noticesearch', - array('q' => $q)); + if ($this->notice->N === 0) { + $this->showEmptyResults($q, $page); + } else { + $terms = preg_split('/[\s,]+/', $q); + $nl = new SearchNoticeList($this->notice, $this, $terms); + $cnt = $nl->show(); + $this->pagination($page > 1, + $cnt > NOTICES_PER_PAGE, + $page, + 'noticesearch', + array('q' => $q)); + } Event::handle('EndNoticeSearchShowResults', array($this, $q, $this->notice)); } } -- 2.39.2