X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FQnA%2Factions%2Fqnanewanswer.php;h=15f32e4bc5844ebed382d72c0ea09f637c2b85c1;hb=0ddc2fc41794dbf062a35218bb12ec836e8cf961;hp=661cbcc328a9dae4a103e9e1d46bf8cdb815545c;hpb=2a4dc77a633cc78907934fd93200ac16d55be78e;p=quix0rs-gnu-social.git diff --git a/plugins/QnA/actions/qnanewanswer.php b/plugins/QnA/actions/qnanewanswer.php index 661cbcc328..15f32e4bc5 100644 --- a/plugins/QnA/actions/qnanewanswer.php +++ b/plugins/QnA/actions/qnanewanswer.php @@ -151,10 +151,8 @@ class QnanewanswerAction extends Action if ($this->boolean('ajax')) { common_debug("ajaxy part"); $answer = $this->question->getAnswer($profile); - 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('Answers')); @@ -166,10 +164,10 @@ class QnanewanswerAction extends Action $nli->show(); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } else { common_debug("not ajax"); - common_redirect($this->question->bestUrl(), 303); + common_redirect($this->question->getUrl(), 303); } } @@ -228,7 +226,7 @@ class QnanewanswerAction extends Action $this->elementStart('body'); $this->element('p', array('id' => 'error'), $msg); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } /** @@ -254,7 +252,7 @@ class QnanewanswerAction extends Action $form->show(); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } /**