X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FQnA%2Factions%2Fqnavote.php;h=6cda1ff827fef15e8d008a04411f793424a029e9;hb=0ddc2fc41794dbf062a35218bb12ec836e8cf961;hp=715f81e831f979f3e99b6fd07ed414cb5b4dffc7;hpb=25198a8d4cee5b2182f1ecb99192a4108a01afa4;p=quix0rs-gnu-social.git diff --git a/plugins/QnA/actions/qnavote.php b/plugins/QnA/actions/qnavote.php index 715f81e831..6cda1ff827 100644 --- a/plugins/QnA/actions/qnavote.php +++ b/plugins/QnA/actions/qnavote.php @@ -90,7 +90,7 @@ class Qnavote extends Action } $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); @@ -142,9 +142,7 @@ class Qnavote extends Action } 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')); @@ -153,9 +151,9 @@ class Qnavote extends Action $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); } }