diff options
Diffstat (limited to 'actions/noticesearch.php')
-rw-r--r-- | actions/noticesearch.php | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/actions/noticesearch.php b/actions/noticesearch.php index a5f01350c..dc58d7528 100644 --- a/actions/noticesearch.php +++ b/actions/noticesearch.php @@ -57,11 +57,11 @@ class NoticesearchAction extends SearchAction return true; } - + /** * Get instructions - * - * @return string instruction text + * + * @return string instruction text */ function getInstructions() { @@ -70,7 +70,7 @@ class NoticesearchAction extends SearchAction /** * Get title - * + * * @return string title */ function title() @@ -78,6 +78,20 @@ class NoticesearchAction extends SearchAction return _('Text search'); } + function getFeeds() + { + $q = $this->trimmed('q'); + + if (!$q) { + return null; + } + + return array(new Feed(Feed::RSS1, common_local_url('noticesearchrss', + array('q' => $q)), + sprintf(_('Search results for "%s" on %s'), + $q, common_config('site', 'name')))); + } + /** * Show results * @@ -120,26 +134,6 @@ class NoticesearchAction extends SearchAction } /** - * Show header - * - * @param array $arr array containing the query - * - * @return void - */ - - function extraHead() - { - $q = $this->trimmed('q'); - if ($q) { - $this->element('link', array('rel' => 'alternate', - 'href' => common_local_url('noticesearchrss', - array('q' => $q)), - 'type' => 'application/rss+xml', - 'title' => _('Search Stream Feed'))); - } - } - - /** * Show notice * * @param class $notice notice |