From: Evan Prodromou Date: Tue, 12 Apr 2011 18:29:12 +0000 (-0400) Subject: Show both empty and full notice search results inside event wrapper X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=606884385c1f62e9e719fe337e0355dc56238b28;p=quix0rs-gnu-social.git Show both empty and full notice search results inside event wrapper --- 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)); } }