diff options
author | Sarven Capadisli <csarven@controlyourself.ca> | 2009-02-11 16:53:01 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@controlyourself.ca> | 2009-02-11 16:53:01 +0000 |
commit | 012288bdf6f4ad41c861504c05b2ac1cee834dd3 (patch) | |
tree | 39482829b98bcf1ac9e6e8b1ce74d8c80afc5a25 /actions/noticesearch.php | |
parent | fc293545be13473d992b512141be233c2963f6da (diff) | |
parent | 22b10399aaa97061ed940f92f5b15f6aacfb1093 (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.php | 62 |
1 files changed, 10 insertions, 52 deletions
diff --git a/actions/noticesearch.php b/actions/noticesearch.php index 2d94a7906..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,62 +78,20 @@ class NoticesearchAction extends SearchAction return _('Text search'); } - - function showExportData() + function getFeeds() { $q = $this->trimmed('q'); - if (!$q) { - return; - } - $fl = new FeedList($this); - $fl->show(array(0 => array('href' => common_local_url('noticesearchrss', array('q' => $q)), - 'type' => 'rss', - 'version' => 'RSS 1.0', - 'item' => 'noticesearchrss'))); - } - - - function showFeeds() - { - $q = $this->trimmed('q'); if (!$q) { - return; + return null; } - $this->element('link', array('rel' => 'alternate', - 'href' => common_local_url('noticesearchrss', - array('q' => $q)), - 'type' => 'application/rss+xml', - 'title' => _('Search Stream Feed'))); + 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 header - * - * @param array $arr array containing the query - * - * @return void - */ - - function extraHead2() - { - $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 results * |