Show both empty and full notice search results inside event wrapper
This commit is contained in:
parent
239d92176d
commit
606884385c
@ -132,19 +132,19 @@ class NoticesearchAction extends SearchAction
|
|||||||
*/
|
*/
|
||||||
function showResults($q, $page)
|
function showResults($q, $page)
|
||||||
{
|
{
|
||||||
if ($this->notice->N === 0) {
|
|
||||||
$this->showEmptyResults($q, $page);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Event::handle('StartNoticeSearchShowResults', array($this, $q, $this->notice))) {
|
if (Event::handle('StartNoticeSearchShowResults', array($this, $q, $this->notice))) {
|
||||||
$terms = preg_split('/[\s,]+/', $q);
|
if ($this->notice->N === 0) {
|
||||||
$nl = new SearchNoticeList($this->notice, $this, $terms);
|
$this->showEmptyResults($q, $page);
|
||||||
$cnt = $nl->show();
|
} else {
|
||||||
$this->pagination($page > 1,
|
$terms = preg_split('/[\s,]+/', $q);
|
||||||
$cnt > NOTICES_PER_PAGE,
|
$nl = new SearchNoticeList($this->notice, $this, $terms);
|
||||||
$page,
|
$cnt = $nl->show();
|
||||||
'noticesearch',
|
$this->pagination($page > 1,
|
||||||
array('q' => $q));
|
$cnt > NOTICES_PER_PAGE,
|
||||||
|
$page,
|
||||||
|
'noticesearch',
|
||||||
|
array('q' => $q));
|
||||||
|
}
|
||||||
Event::handle('EndNoticeSearchShowResults', array($this, $q, $this->notice));
|
Event::handle('EndNoticeSearchShowResults', array($this, $q, $this->notice));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user