]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Poll/actions/respondpoll.php
Introduced common_location_shared() to check if location sharing is always,
[quix0rs-gnu-social.git] / plugins / Poll / actions / respondpoll.php
index df3f68e87c63511f6f94b7a4e9d223eaf37dd7d3..c78038478daae2244a9d4a24852d49a9d5b1639d 100644 (file)
@@ -74,7 +74,7 @@ class RespondPollAction extends Action
     {
         parent::prepare($argarray);
         if ($this->boolean('ajax')) {
-            StatusNet::setApi(true);
+            GNUsocial::setApi(true);
         }
 
         $this->user = common_current_user();
@@ -144,9 +144,7 @@ class RespondPollAction 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 a poll response.
             $this->element('title', null, _m('Poll results'));
@@ -155,9 +153,9 @@ class RespondPollAction extends Action
             $form = new PollResultForm($this->poll, $this);
             $form->show();
             $this->elementEnd('body');
-            $this->elementEnd('html');
+            $this->endHTML();
         } else {
-            common_redirect($this->poll->bestUrl(), 303);
+            common_redirect($this->poll->getUrl(), 303);
         }
     }
 
@@ -188,7 +186,7 @@ class RespondPollAction extends Action
      *
      * @return boolean is read only action?
      */
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
             $_SERVER['REQUEST_METHOD'] == 'HEAD') {