}
$id = $this->trimmed('id');
- $this->question = QnA_Question::staticGet('id', $id);
+ $this->question = QnA_Question::getKV('id', $id);
if (empty($this->question)) {
// TRANS: Client exception thrown trying to respond to a non-existing question.
throw new ClientException(_m('Invalid or missing question.'), 404);
}
if ($this->boolean('ajax')) {
- 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 in a vote for a question or answer.
$this->element('title', null, _m('Answers'));
$form = new QnA_Answer($this->question, $this);
$form->show();
$this->elementEnd('body');
- $this->elementEnd('html');
+ $this->endHTML();
} else {
- common_redirect($this->question->bestUrl(), 303);
+ common_redirect($this->question->getUrl(), 303);
}
}