diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-12-05 01:03:04 -0500 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-12-05 01:03:04 -0500 |
commit | 51f0dd5e37db0e8d2a8690655555d399249942df (patch) | |
tree | 33238b09ad63eaefdb2c6499da8bab59d91188ed /lib/xmloutputter.php | |
parent | c08d7f1aa4ac235f524da3994c2f1aef3b0fd079 (diff) |
Add configuration option to toggle the indenting of the output HTML. Defaults to indent enabled.
Diffstat (limited to 'lib/xmloutputter.php')
-rw-r--r-- | lib/xmloutputter.php | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |