}
if ($this->boolean('ajax')) {
common_debug("ajaxy part");
- header('Content-Type: text/xml;charset=utf-8');
- $this->xw->startDocument('1.0', 'UTF-8');
- $this->elementStart('html');
+ $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
// TRANS: Page title after sending an answer.
$this->element('title', null, _m('Answer'));
$form = new QnashowanswerForm($this, $answer);
$form->show();
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
} else {
common_redirect($this->answer->bestUrl(), 303);
}
}
if ($this->boolean('ajax')) {
common_debug("ajaxy part");
- header('Content-Type: text/xml;charset=utf-8');
- $this->xw->startDocument('1.0', 'UTF-8');
- $this->elementStart('html');
+ $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
// TRANS: Page title after sending an answer.
$this->element('title', null, _m('Answer'));
$form = new QnashowanswerForm($this, $answer);
$form->show();
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
} else {
common_redirect($this->answer->bestUrl(), 303);
}
function showAjaxReviseForm()
{
- header('Content-Type: text/xml;charset=utf-8');
- $this->xw->startDocument('1.0', 'UTF-8');
- $this->elementStart('html');
+ $this->startHTML('text/xml;charset=utf-8');
$this->elementStart('head');
// TRANS: Form title for sending an answer.
$this->element('title', null, _m('TITLE','Answer'));
$form = new QnareviseanswerForm($this->answer, $this);
$form->show();
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
}
/**