]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Event/actions/newrsvp.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / plugins / Event / actions / newrsvp.php
index 272c6f0d9f624b5fed798f22bafa047d2a16e491..ea32b2b368e179a9c3f6121367f931d4a122dc1d 100644 (file)
@@ -72,7 +72,7 @@ class NewrsvpAction extends Action
     {
         parent::prepare($argarray);
         if ($this->boolean('ajax')) {
-            StatusNet::setApi(true); // short error results!
+            GNUsocial::setApi(true); // short error results!
         }
 
         $eventId = $this->trimmed('event');
@@ -155,22 +155,18 @@ class NewrsvpAction extends Action
 
         if ($this->boolean('ajax')) {
             $rsvp = RSVP::fromNotice($saved);
-            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 creating an event.
             $this->element('title', null, _m('Event saved'));
             $this->elementEnd('head');
             $this->elementStart('body');
-            $this->elementStart('body');
             $cancel = new CancelRSVPForm($rsvp, $this);
             $cancel->show();
             $this->elementEnd('body');
-            $this->elementEnd('body');
-            $this->elementEnd('html');
+            $this->endHTML();
         } else {
-            common_redirect($saved->bestUrl(), 303);
+            common_redirect($saved->getUrl(), 303);
         }
     }
 
@@ -201,7 +197,7 @@ class NewrsvpAction 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') {