X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Frssaction.php;h=2f25ed7e47d14150094efaa57b5322d1c56b862b;hb=76aa85fe5ef408cecf7c40c0c56d58ff9ac9fcbb;hp=66c2d9e8cd2399adf22a6311a044ae604fadf458;hpb=eaac9350dd0ff02dda975f48e0be0c6ad1e7a56d;p=quix0rs-gnu-social.git diff --git a/lib/rssaction.php b/lib/rssaction.php index 66c2d9e8cd..2f25ed7e47 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -94,11 +94,15 @@ class Rss10Action extends Action function handle($args) { - // Get the list of notices - $this->notices = $this->getNotices(); // Parent handling, including cache check parent::handle($args); - $this->showRss($this->limit); + // Get the list of notices + if (empty($this->tag)) { + $this->notices = $this->getNotices($this->limit); + } else { + $this->notices = $this->getTaggedNotices($this->tag, $this->limit); + } + $this->showRss(); } /** @@ -132,15 +136,13 @@ class Rss10Action extends Action return null; } - function showRss($limit=0) + function showRss() { - $notices = $this->getNotices($limit); - $this->initRss(); - $this->showChannel($notices); + $this->showChannel(); $this->showImage(); - foreach ($notices as $n) { + foreach ($this->notices as $n) { $this->showItem($n); } @@ -148,7 +150,7 @@ class Rss10Action extends Action $this->endRss(); } - function showChannel($notices) + function showChannel() { $channel = $this->getChannel(); @@ -167,7 +169,7 @@ class Rss10Action extends Action $this->elementStart('items'); $this->elementStart('rdf:Seq'); - foreach ($notices as $notice) { + foreach ($this->notices as $notice) { $this->element('sioct:MicroblogPost', array('rdf:resource' => $notice->uri)); }