X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fxmloutputter.php;h=528f633050570c54b939ebed2b73f513a9a63d10;hb=edb467978d49e53da95e4d69ea9733395fed0aa3;hp=64935da4081b6b5e63d21efaefdfe888c7cdd93d;hpb=6b42b2a09c2031a0e3ac589589cbd1e2f545ac4c;p=quix0rs-gnu-social.git diff --git a/lib/xmloutputter.php b/lib/xmloutputter.php index 64935da408..528f633050 100644 --- a/lib/xmloutputter.php +++ b/lib/xmloutputter.php @@ -1,6 +1,6 @@ . * * @category Output - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli - * @copyright 2008 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli + * @copyright 2008 StatusNet, Inc. * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ */ -if (!defined('LACONICA')) { +if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } @@ -40,11 +40,11 @@ if (!defined('LACONICA')) { * an element. * * @category Output - * @package Laconica - * @author Evan Prodromou - * @author Sarven Capadisli + * @package StatusNet + * @author Evan Prodromou + * @author Sarven Capadisli * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 - * @link http://laconi.ca/ + * @link http://status.net/ * @see Action * @see HTMLOutputter */ @@ -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(); + } }