]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/xmloutputter.php
Replies and Conversation noticestreams should only get POSTs by default
[quix0rs-gnu-social.git] / lib / xmloutputter.php
index d7bb1bf00619a66ec2ab337262a21dc77c8375b8..528f633050570c54b939ebed2b73f513a9a63d10 100644 (file)
@@ -28,7 +28,7 @@
  * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -67,10 +67,13 @@ class XMLOutputter
      * @param boolean $indent Whether to indent output, default true
      */
 
-    function __construct($output='php://output', $indent=true)
+    function __construct($output='php://output', $indent=null)
     {
         $this->xw = new XMLWriter();
         $this->xw->openURI($output);
+        if(is_null($indent)) {
+            $indent = common_config('site', 'indent');
+        }
         $this->xw->setIndent($indent);
     }
 
@@ -239,4 +242,15 @@ class XMLOutputter
     {
         $this->xw->writeComment($txt);
     }
+
+    /**
+     * Flush output buffers
+     *
+     * @return void
+     */
+
+    function flush()
+    {
+        $this->xw->flush();
+    }
 }