summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/action.php2
-rw-r--r--lib/default.php1
-rw-r--r--lib/error.php2
-rw-r--r--lib/htmloutputter.php2
-rw-r--r--lib/rssaction.php2
-rw-r--r--lib/xmloutputter.php5
6 files changed, 9 insertions, 5 deletions
diff --git a/lib/action.php b/lib/action.php
index 8ad391755..87d8a4399 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -68,7 +68,7 @@ class Action extends HTMLOutputter // lawsuit
* @see XMLOutputter::__construct
* @see HTMLOutputter::__construct
*/
- function __construct($output='php://output', $indent=true)
+ function __construct($output='php://output', $indent=null)
{
parent::__construct($output, $indent);
}
diff --git a/lib/default.php b/lib/default.php
index d4ef045ea..db90aeca3 100644
--- a/lib/default.php
+++ b/lib/default.php
@@ -53,6 +53,7 @@ $default =
'shorturllength' => 30,
'dupelimit' => 60, # default for same person saying the same thing
'textlimit' => 140,
+ 'indent' => true,
),
'db' =>
array('database' => 'YOU HAVE TO SET THIS IN config.php',
diff --git a/lib/error.php b/lib/error.php
index 3162cfe65..87a4d913b 100644
--- a/lib/error.php
+++ b/lib/error.php
@@ -50,7 +50,7 @@ class ErrorAction extends Action
var $message = null;
var $default = null;
- function __construct($message, $code, $output='php://output', $indent=true)
+ function __construct($message, $code, $output='php://output', $indent=null)
{
parent::__construct($output, $indent);
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index fd448ced5..2091c6e2c 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -67,7 +67,7 @@ class HTMLOutputter extends XMLOutputter
* @param boolean $indent Whether to indent output, default true
*/
- function __construct($output='php://output', $indent=true)
+ function __construct($output='php://output', $indent=null)
{
parent::__construct($output, $indent);
}
diff --git a/lib/rssaction.php b/lib/rssaction.php
index d591c99ed..62e3f21b6 100644
--- a/lib/rssaction.php
+++ b/lib/rssaction.php
@@ -52,7 +52,7 @@ class Rss10Action extends Action
* @see Action::__construct
*/
- function __construct($output='php://output', $indent=true)
+ function __construct($output='php://output', $indent=null)
{
parent::__construct($output, $indent);
}
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);
}