]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/rssaction.php
let avatars be served over SSL
[quix0rs-gnu-social.git] / lib / rssaction.php
index 3b303f73ea0540b8bb50989e7938ce50af03048e..62e3f21b61dc1f074547666cb3edbba681b1990d 100644 (file)
@@ -52,7 +52,7 @@ class Rss10Action extends Action
      * @see Action::__construct
      */
 
-    function __construct($output='php://output', $indent=true)
+    function __construct($output='php://output', $indent=null)
     {
         parent::__construct($output, $indent);
     }
@@ -176,8 +176,10 @@ class Rss10Action extends Action
         $this->showChannel();
         $this->showImage();
 
-        foreach ($this->notices as $n) {
-            $this->showItem($n);
+        if (count($this->notices)) {
+            foreach ($this->notices as $n) {
+                $this->showItem($n);
+            }
         }
 
         $this->showCreators();
@@ -203,8 +205,10 @@ class Rss10Action extends Action
         $this->elementStart('items');
         $this->elementStart('rdf:Seq');
 
-        foreach ($this->notices as $notice) {
-            $this->element('rdf:li', array('rdf:resource' => $notice->uri));
+        if (count($this->notices)) {
+            foreach ($this->notices as $notice) {
+                $this->element('rdf:li', array('rdf:resource' => $notice->uri));
+            }
         }
 
         $this->elementEnd('rdf:Seq');