X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fxmloutputter.php;h=528f633050570c54b939ebed2b73f513a9a63d10;hb=edb467978d49e53da95e4d69ea9733395fed0aa3;hp=5f06e491df2c2182fef496be074d419efe5c987c;hpb=bbb830e14c718c687f0636710a1827c90b11f4cc;p=quix0rs-gnu-social.git diff --git a/lib/xmloutputter.php b/lib/xmloutputter.php index 5f06e491df..528f633050 100644 --- a/lib/xmloutputter.php +++ b/lib/xmloutputter.php @@ -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(); + } }