1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class TagrssAction extends Rss10Action
- {
- protected $tag;
- protected function doStreamPreparation()
- {
- $tag = common_canonical_tag($this->trimmed('tag'));
- $this->tag = Notice_tag::getKV('tag', $tag);
- if (!$this->tag instanceof Notice_tag) {
-
- $this->clientError(_('No such tag.'));
- }
- }
- protected function getNotices()
- {
- $stream = Notice_tag::getStream($this->tag->tag)->getNotices(0, $this->limit);
- return $stream->fetchAll();
- }
- function getChannel()
- {
- $tagname = $this->tag->tag;
- $c = array('url' => common_local_url('tagrss', array('tag' => $tagname)),
- 'title' => $tagname,
- 'link' => common_local_url('tagrss', array('tag' => $tagname)),
-
-
- 'description' => sprintf(_('Updates tagged with %1$s on %2$s!'),
- $tagname, common_config('site', 'name')));
- return $c;
- }
- function isReadOnly($args)
- {
- return true;
- }
- }
|