]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/finishremotesubscribe.php
change LACONICA to STATUSNET
[quix0rs-gnu-social.git] / actions / finishremotesubscribe.php
index eaf57c2d8fac59ea5862d22b155de58eb1f45e55..5df36070fa54715c1596da68b22b4cd517f11127 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
- * Laconica - a distributed open-source microblogging tool
- * Copyright (C) 2008, Controlez-Vous, Inc.
+ * StatusNet - the distributed open-source microblogging tool
+ * Copyright (C) 2008, 2009, StatusNet, 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
@@ -17,7 +17,7 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-if (!defined('LACONICA')) { exit(1); }
+if (!defined('STATUSNET')) { exit(1); }
 
 require_once(INSTALLDIR.'/lib/omb.php');
 
@@ -44,7 +44,7 @@ class FinishremotesubscribeAction extends Action
         common_debug('stored request: '.print_r($omb,true), __FILE__);
 
         common_remove_magic_from_request();
-        $req = OAuthRequest::from_request();
+        $req = OAuthRequest::from_request('POST', common_local_url('finishuserauthorization'));
 
         $token = $req->get_parameter('oauth_token');
 
@@ -230,7 +230,8 @@ class FinishremotesubscribeAction extends Action
         # show up close to the top of the page
 
         common_redirect(common_local_url('subscribers', array('nickname' =>
-                                                             $user->nickname)));
+                                                             $user->nickname)),
+                        303);
     }
 
     function add_avatar($profile, $url)
@@ -283,7 +284,7 @@ class FinishremotesubscribeAction extends Action
         $fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
         $result = $fetcher->post($req->get_normalized_http_url(),
                                  $req->to_postdata(),
-                                 array('User-Agent: Laconica/' . LACONICA_VERSION));
+                                 array('User-Agent: StatusNet/' . STATUSNET_VERSION));
 
         common_debug('got result: "'.print_r($result,true).'"', __FILE__);