From 51f0dd5e37db0e8d2a8690655555d399249942df Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Sat, 5 Dec 2009 01:03:04 -0500 Subject: Add configuration option to toggle the indenting of the output HTML. Defaults to indent enabled. --- lib/xmloutputter.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/xmloutputter.php') diff --git a/lib/xmloutputter.php b/lib/xmloutputter.php index 5f06e491d..15b18e7d9 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); } -- cgit v1.2.3-54-g00ecf