summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/showstream.php9
-rw-r--r--actions/userrss.php24
2 files changed, 31 insertions, 2 deletions
diff --git a/actions/showstream.php b/actions/showstream.php
index 1654f589c..678a3174c 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -113,6 +113,15 @@ class ShowstreamAction extends ProfileAction
function getFeeds()
{
+ if (!empty($this->tag)) {
+ return array(new Feed(Feed::RSS1,
+ common_local_url('userrss',
+ array('nickname' => $this->user->nickname,
+ 'tag' => $this->tag)),
+ sprintf(_('Notice feed for %s tagged %s (RSS 1.0)'),
+ $this->user->nickname, $this->tag)));
+ }
+
return array(new Feed(Feed::RSS1,
common_local_url('userrss',
array('nickname' => $this->user->nickname)),
diff --git a/actions/userrss.php b/actions/userrss.php
index 5861d9ee3..2280509b2 100644
--- a/actions/userrss.php
+++ b/actions/userrss.php
@@ -25,14 +25,15 @@ require_once(INSTALLDIR.'/lib/rssaction.php');
class UserrssAction extends Rss10Action
{
-
var $user = null;
+ var $tag = null;
function prepare($args)
{
parent::prepare($args);
- $nickname = $this->trimmed('nickname');
+ $nickname = $this->trimmed('nickname');
$this->user = User::staticGet('nickname', $nickname);
+ $this->tag = $this->trimmed('tag');
if (!$this->user) {
$this->clientError(_('No such user.'));
@@ -42,6 +43,25 @@ class UserrssAction extends Rss10Action
}
}
+ function getTaggedNotices($tag = null, $limit=0)
+ {
+ $user = $this->user;
+
+ if (is_null($user)) {
+ return null;
+ }
+
+ $notice = $user->getTaggedNotices(0, ($limit == 0) ? NOTICES_PER_PAGE : $limit, 0, 0, null, $tag);
+
+ $notices = array();
+ while ($notice->fetch()) {
+ $notices[] = clone($notice);
+ }
+
+ return $notices;
+ }
+
+
function getNotices($limit=0)
{