diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-05-19 14:42:19 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-05-19 14:42:19 -0400 |
commit | 8cc8f9fd0c0ad8d1c38bd0c113f9f0a4d7918256 (patch) | |
tree | 9ff8e6cecfcd1539a2d6772133cd99e7706d94fc /actions/userrss.php | |
parent | 99f8501d321ae9d8087abbe6523e28ce5fd095d3 (diff) | |
parent | 09e95cc33fb2228066d524e399bcc549e85eb565 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
Conflicts:
config.php.sample
Diffstat (limited to 'actions/userrss.php')
-rw-r--r-- | actions/userrss.php | 24 |
1 files changed, 22 insertions, 2 deletions
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) { |