]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OpenID/openidserver.php
Localisation updates from http://translatewiki.net.
[quix0rs-gnu-social.git] / plugins / OpenID / openidserver.php
index 0e16881c5fa62706b4b62c875b8d118024ac92f5..847eb48c65fbb773b7a9d585eea81951a1bf414a 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET') && !defined('LACONICA')) {
+if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR.'/lib/action.php';
 require_once INSTALLDIR.'/plugins/OpenID/openid.php';
-require_once(INSTALLDIR.'/plugins/OpenID/User_openid_trustroot.php');
 
 /**
  * Settings for OpenID
@@ -71,7 +69,11 @@ class OpenidserverAction extends Action
                     //cannot prompt the user to login in immediate mode, so answer false
                     $response = $this->generateDenyResponse($request);
                 }else{
-                    /* Go log in, and then come back. */
+                    // Go log in, and then come back.
+                    //
+                    // Note: 303 redirect rather than 307 to avoid
+                    // prompting user for form resubmission if we
+                    // were POSTed here.
                     common_set_returnto($_SERVER['REQUEST_URI']);
                     common_redirect(common_local_url('login'), 303);
                     return;
@@ -92,7 +94,12 @@ class OpenidserverAction extends Action
                         $this->oserver->encodeResponse($denyResponse); //sign the response
                         $_SESSION['openid_allow_url'] = $allowResponse->encodeToUrl();
                         $_SESSION['openid_deny_url'] = $denyResponse->encodeToUrl();
-                        //ask the user to trust this trust root
+
+                        // Ask the user to trust this trust root...
+                        //
+                        // Note: 303 redirect rather than 307 to avoid
+                        // prompting user for form resubmission if we
+                        // were POSTed here.
                         common_redirect(common_local_url('openidtrust'), 303);
                         return;
                     }
@@ -106,6 +113,7 @@ class OpenidserverAction extends Action
             } else {
                 //invalid
                 // TRANS: OpenID plugin client error given trying to add an unauthorised OpenID to a user (403).
+                // TRANS: %s is a request identity.
                 $this->clientError(sprintf(_m('You are not authorized to use the identity %s.'),$request->identity),$code=403);
             }
         } else {
@@ -133,7 +141,7 @@ class OpenidserverAction extends Action
 
     function generateAllowResponse($request, $user){
         $response = $request->answer(true, null, common_profile_url($user->nickname));
-        
+
         $profile = $user->getProfile();
         $sreg_data = array(
             'fullname' => $profile->fullname,