From 08b430a24736e3bd92c2b8464f825c3ec00f6b79 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 15 Mar 2011 15:33:37 -0700 Subject: [PATCH] Event hook for notice search pages --- actions/noticesearch.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/actions/noticesearch.php b/actions/noticesearch.php index 4f4c7a05ba..1f43af800d 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -138,11 +138,14 @@ class NoticesearchAction extends SearchAction $this->elementEnd('div'); return; } - $terms = preg_split('/[\s,]+/', $q); - $nl = new SearchNoticeList($notice, $this, $terms); - $cnt = $nl->show(); - $this->pagination($page > 1, $cnt > NOTICES_PER_PAGE, - $page, 'noticesearch', array('q' => $q)); + if (Event::handle('StartNoticeSearchShowResults', array($this, $q, $notice))) { + $terms = preg_split('/[\s,]+/', $q); + $nl = new SearchNoticeList($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, $notice)); + } } function showScripts() -- 2.39.5