]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/nudge.php
Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
[quix0rs-gnu-social.git] / actions / nudge.php
index ca6fd376123feb36e7cfc89eb2d94eaaecf504bc..78c0ee566b55923b7fbcddbaf07f81d86fae1f44 100644 (file)
@@ -13,7 +13,7 @@
  * @link     http://laconi.ca/
  *
  * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * Copyright (C) 2008, 2009, Control Yourself, Inc.
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU Affero General Public License as published by
@@ -50,7 +50,7 @@ class NudgeAction extends Action
 {
      /**
      * Class handler.
-     * 
+     *
      * @param array $args array of arguments
      *
      * @return nothing
@@ -75,7 +75,7 @@ class NudgeAction extends Action
 
         // CSRF protection
         $token = $this->trimmed('token');
-        
+
         if (!$token || $token != common_session_token()) {
             $this->clientError(_('There was a problem with your session token. Try again, please.'));
             return;
@@ -89,7 +89,7 @@ class NudgeAction extends Action
         $this->notify($user, $other);
 
         if ($this->boolean('ajax')) {
-            $this->startHTML('text/xml;charset=utf-8', true);
+            $this->startHTML('text/xml;charset=utf-8');
             $this->elementStart('head');
             $this->element('title', null, _('Nudge sent'));
             $this->elementEnd('head');
@@ -100,7 +100,8 @@ class NudgeAction extends Action
         } else {
             // display a confirmation to the user
             common_redirect(common_local_url('showstream',
-                                             array('nickname' => $other->nickname)));
+                                             array('nickname' => $other->nickname)),
+                            303);
         }
     }
 
@@ -122,5 +123,10 @@ class NudgeAction extends Action
             // XXX: notify by SMS
         }
     }
+
+    function isReadOnly($args)
+    {
+        return true;
+    }
 }