]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OpenID/actions/openidtrust.php
Merge branch 'fix-openid-removal' into 'master'
[quix0rs-gnu-social.git] / plugins / OpenID / actions / openidtrust.php
index d39d8541c6c7b74a07b306a47f8ff28b1d931cfa..3f8a3a93b77afb73b0e6d3457684172cbda11b2f 100644 (file)
@@ -60,7 +60,6 @@ class OpenidtrustAction extends Action
             /* Go log in, and then come back. */
             common_set_returnto($_SERVER['REQUEST_URI']);
             common_redirect(common_local_url('login'));
-            return;
         }
         $this->trust_root = $_SESSION['openid_trust_root'];
         $this->allowUrl = $_SESSION['openid_allow_url'];
@@ -68,7 +67,6 @@ class OpenidtrustAction extends Action
         if(empty($this->trust_root) || empty($this->allowUrl) || empty($this->denyUrl)){
             // TRANS: Client error when visiting page directly.
             $this->clientError(_m('This page should only be reached during OpenID processing, not directly.'));
-            return;
         }
         return true;
     }
@@ -85,6 +83,8 @@ class OpenidtrustAction extends Action
 
     function handleSubmit()
     {
+        global $_PEAR;
+
         unset($_SESSION['openid_trust_root']);
         unset($_SESSION['openid_allow_url']);
         unset($_SESSION['openid_deny_url']);
@@ -94,9 +94,9 @@ class OpenidtrustAction extends Action
             $user_openid_trustroot = new User_openid_trustroot();
             $user_openid_trustroot->user_id = $this->user->id;
             $user_openid_trustroot->trustroot = $this->trust_root;
-            $user_openid_trustroot->created = DB_DataObject_Cast::dateTime();
+            $user_openid_trustroot->created = common_sql_now();
             if (!$user_openid_trustroot->insert()) {
-                $err = PEAR::getStaticProperty('DB_DataObject','lastError');
+                $err = &$_PEAR->getStaticProperty('DB_DataObject','lastError');
             }
             common_redirect($this->allowUrl, $code=302);
         }else{