diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-02-26 13:22:51 -0800 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-02-26 13:22:51 -0800 |
commit | 34a61b40f47a52d1fdcf7cd907f3ac53b96b038e (patch) | |
tree | 14ddeb18d9e020760d8c2308a12d858b6eab4a17 /actions/noticesearch.php | |
parent | 478192fa3b2375a0ff0a5ff03956381e5da7a6ac (diff) | |
parent | 8c3fe83c645265a11a3fca80cac2ac48ea72cdab (diff) |
Merge branch '0.7.x' into 0.8.x
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 |