]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/remotesubscribe.php
Resetup the ajaxification for replies and favors after inf. scrolling
[quix0rs-gnu-social.git] / actions / remotesubscribe.php
index af130f42588057ba1b2a811352f1ebbef5f9d59c..374392d4a31df096599dc11cc2e59f002566aeaa 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') && !defined('LACONICA')) { exit(1); }
 
 require_once(INSTALLDIR.'/lib/omb.php');
 
@@ -71,11 +71,13 @@ class RemotesubscribeAction extends Action
         if ($this->err) {
             $this->element('div', 'error', $this->err);
         } else {
-            $inst = _('To subscribe, you can [login](%%action.login%%),' .
-                      ' or [register](%%action.register%%) a new ' .
-                      ' account. If you already have an account ' .
-                      ' on a [compatible microblogging site](%%doc.openmublog%%), ' .
-                      ' enter your profile URL below.');
+            $inst = sprintf(_('To subscribe, you can [login](%%%%action.%s%%%%),' .
+                              ' or [register](%%%%action.%s%%%%) a new ' .
+                              ' account. If you already have an account ' .
+                              ' on a [compatible microblogging site](%%doc.openmublog%%), ' .
+                              ' enter your profile URL below.'),
+                            (!common_config('site','openidonly')) ? 'login' : 'openidlogin',
+                            (!common_config('site','openidonly')) ? 'register' : 'openidlogin');
             $output = common_markup_to_html($inst);
             $this->elementStart('div', 'instructions');
             $this->raw($output);
@@ -97,9 +99,9 @@ class RemotesubscribeAction extends Action
                                           'class' => 'form_settings',
                                           'action' => common_local_url('remotesubscribe')));
         $this->elementStart('fieldset');
-        $this->element('legend', 'Subscribe to a remote user');
+        $this->element('legend', _('Subscribe to a remote user'));
         $this->hidden('token', common_session_token());
-        
+
         $this->elementStart('ul', 'form_data');
         $this->elementStart('li');
         $this->input('nickname', _('User nickname'), $this->nickname,
@@ -321,7 +323,7 @@ class RemotesubscribeAction extends Action
 
         $result = $fetcher->post($req->get_normalized_http_url(),
                                  $req->to_postdata(),
-                                 array('User-Agent: Laconica/' . LACONICA_VERSION));
+                                 array('User-Agent: StatusNet/' . STATUSNET_VERSION));
         if ($result->status != 200) {
             return null;
         }
@@ -407,7 +409,7 @@ class RemotesubscribeAction extends Action
 
         # Redirect to authorization service
 
-        common_redirect($req->to_url());
+        common_redirect($req->to_url(), 303);
         return;
     }
 }