summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-02-05 18:10:47 +0000
committerRobin Millette <millette@controlyourself.ca>2009-02-05 18:10:47 +0000
commit9febe8ce394d8428355ac73f1c0f6a9555252bd2 (patch)
tree8e6cfdb3ed3ec5d1baeed8caced56411da8a5e6e
parent7ea136ee1ba350a64b95cd86a386f3e0d0e339d8 (diff)
trac #1142 fix tag rss
-rw-r--r--actions/tagrss.php16
-rw-r--r--lib/util.php2
2 files changed, 9 insertions, 9 deletions
diff --git a/actions/tagrss.php b/actions/tagrss.php
index b4c2dcdff..a77fa12c9 100644
--- a/actions/tagrss.php
+++ b/actions/tagrss.php
@@ -25,12 +25,12 @@ require_once(INSTALLDIR.'/lib/rssaction.php');
class TagrssAction extends Rss10Action
{
+ var $tag;
- function init()
- {
- $tag = $this->trimmed('tag');
+ function prepare($args) {
+ parent::prepare($args);
+ $tag = common_canonical_tag($this->trimmed('tag'));
$this->tag = Notice_tag::staticGet('tag', $tag);
-
if (!$this->tag) {
$this->clientError(_('No such tag.'));
return false;
@@ -39,7 +39,7 @@ class TagrssAction extends Rss10Action
}
}
- function get_notices($limit=0)
+ function getNotices($limit=0)
{
$tag = $this->tag;
@@ -48,7 +48,6 @@ class TagrssAction extends Rss10Action
}
$notice = Notice_tag::getStream($tag->tag, 0, ($limit == 0) ? NOTICES_PER_PAGE : $limit);
-
while ($notice->fetch()) {
$notices[] = clone($notice);
}
@@ -56,10 +55,9 @@ class TagrssAction extends Rss10Action
return $notices;
}
- function get_channel()
+ function getChannel()
{
- $tag = $this->tag->tag;
-
+ $tagname = $this->tag->tag;
$c = array('url' => common_local_url('tagrss', array('tag' => $tagname)),
'title' => $tagname,
'link' => common_local_url('tagrss', array('tag' => $tagname)),
diff --git a/lib/util.php b/lib/util.php
index 579f964ac..cbff35a9d 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -736,6 +736,8 @@ function common_fancy_url($action, $args=null)
return common_path("api/statuses/public_timeline.atom");
case 'publicxrds':
return common_path('xrds');
+ case 'tagrss':
+ return common_path('tag/' . $args['tag'] . '/rss');
case 'featuredrss':
return common_path('featuredrss');
case 'favoritedrss':