summaryrefslogtreecommitdiff
path: root/actions/noticesearch.php
diff options
context:
space:
mode:
authorTobias Diekershoff <tobias.diekershoff@gmx.net>2009-04-10 14:25:25 +0200
committerTobias Diekershoff <tobias.diekershoff@gmx.net>2009-04-10 14:25:25 +0200
commit4277a6818c6ac66158dfba3b94bdc1b2eb06b594 (patch)
tree99149b95d0bd0bfaac4b2ad3d646e8cc1da7f51a /actions/noticesearch.php
parentd1bf8b2143f597d9d1b1e7ff472532c596200011 (diff)
parent6cdc2ff444b8c76a3cdc5b8c6e9e7e7539d9b6cc (diff)
Merge branch '0.7.x' of git://gitorious.org/laconica/dev into 0.7.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 {