common_broadcast_notice($notice);
if ($this->boolean('ajax')) {
- common_start_html('text/xml;charset=utf-8');
+ common_start_html('text/xml;charset=utf-8', false);
common_element_start('head');
common_element('title', null, _('Notice posted'));
common_element_end('head');
}
function ajax_error_msg($msg) {
- common_start_html('text/xml;charset=utf-8');
+ common_start_html('text/xml;charset=utf-8', false);
common_element_start('head');
common_element('title', null, _('Ajax Error'));
common_element_end('head');
common_element_end($tag);
}
-function common_start_xml($doc=NULL, $public=NULL, $system=NULL) {
+function common_start_xml($doc=NULL, $public=NULL, $system=NULL, $indent=true) {
global $xw;
$xw = new XMLWriter();
$xw->openURI('php://output');
- $xw->setIndent(true);
+ $xw->setIndent($indent);
$xw->startDocument('1.0', 'UTF-8');
if ($doc) {
$xw->writeDTD($doc, $public, $system);
common_element_start('div', array('id' => 'content'));
}
-function common_start_html($type=NULL) {
+function common_start_html($type=NULL, $indent=true) {
if (!$type) {
$httpaccept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : NULL;
common_start_xml('html',
'-//W3C//DTD XHTML 1.0 Strict//EN',
- 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
+ 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', $indent);
# FIXME: correct language for interface