summaryrefslogtreecommitdiff
path: root/actions/noticesearch.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-04-08 22:55:13 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-04-08 22:55:13 +0000
commite5657ca4bbd8a43bf2dd44c2554e807a45224bd7 (patch)
tree3ad9a722f787e277ab571d40522cd5289da738dc /actions/noticesearch.php
parente632f3be6f48c187b8049f35756b25ae80be2f0b (diff)
parent070cd3533c3474dc065c6681befb92dac51f4bf7 (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'actions/noticesearch.php')
-rw-r--r--actions/noticesearch.php21
1 files changed, 13 insertions, 8 deletions
diff --git a/actions/noticesearch.php b/actions/noticesearch.php
index 9058cf53c..095d0a454 100644
--- a/actions/noticesearch.php
+++ b/actions/noticesearch.php
@@ -114,22 +114,27 @@ class NoticesearchAction extends SearchAction
$cnt = $notice->find();
}
if ($cnt === 0) {
- $this->element('p', 'error', _('No results'));
+ $this->element('p', 'error', _('No results.'));
+
+ $this->searchSuggestions($q);
+ if (common_logged_in()) {
+ $message = sprintf(_('Be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q));
+ }
+ else {
+ $message = sprintf(_('Why not [register an account](%%%%action.register%%%%) and be the first to [post on this topic](%%%%action.newnotice%%%%?status_textarea=%s)!'), urlencode($q));
+ }
+
+ $this->elementStart('div', 'guide');
+ $this->raw(common_markup_to_html($message));
+ $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));
}
-
- function isReadOnly()
- {
- return true;
- }
}
class SearchNoticeList extends NoticeList {