]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/actions/qnaclosequestion.php
Trying to debug some stuff regarding oEmbed
[quix0rs-gnu-social.git] / plugins / QnA / actions / qnaclosequestion.php
index 87a848987ceb3d36438a5e08d2abb79f1dc1a551..5c5e0f846757b1a046404e870565fda533088cd1 100644 (file)
@@ -74,7 +74,7 @@ class QnaclosequestionAction extends Action
     {
         parent::prepare($argarray);
         if ($this->boolean('ajax')) {
-            StatusNet::setApi(true);
+            GNUsocial::setApi(true);
         }
 
         $this->user = common_current_user();
@@ -147,9 +147,7 @@ class QnaclosequestionAction 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 an answer.
             $this->element('title', null, _m('Answers'));
@@ -158,9 +156,9 @@ class QnaclosequestionAction extends Action
             $form = new QnashowquestionForm($this, $this->question);
             $form->show();
             $this->elementEnd('body');
-            $this->elementEnd('html');
+            $this->endHTML();
         } else {
-            common_redirect($this->question->bestUrl(), 303);
+            common_redirect($this->question->getUrl(), 303);
         }
     }