From 84d2aa7df49dc85603dd6c2d60c1f605800a458c Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Mon, 6 Apr 2009 01:14:59 +0000 Subject: [PATCH] refactored search suggestions and added forgotten sprintf. --- actions/peoplesearch.php | 21 ++------------------- lib/searchaction.php | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/actions/peoplesearch.php b/actions/peoplesearch.php index 6fbb19b882..3ce719dd55 100644 --- a/actions/peoplesearch.php +++ b/actions/peoplesearch.php @@ -82,25 +82,8 @@ class PeoplesearchAction extends SearchAction } else { $this->element('p', 'error', _('No results.')); - $qe = urlencode($q); - $message = _(<<elementStart('div', 'blankfiller'); - $this->raw(common_markup_to_html($message)); - $this->elementEnd('div'); +//TODO + $this->searchSuggestions($q); $profile->free(); } } diff --git a/lib/searchaction.php b/lib/searchaction.php index c762db16f0..697262ccdb 100644 --- a/lib/searchaction.php +++ b/lib/searchaction.php @@ -133,5 +133,28 @@ class SearchAction extends Action $this->showResults($q, $page); } } + + function searchSuggestions($q) { + $qe = urlencode($q); + $message = sprintf(_(<<elementStart('div', 'blankfiller'); + $this->raw(common_markup_to_html($message)); + $this->elementEnd('div'); + } }