return _m('OpenID Identity Verification');
}
- function prepare($args)
+ function prepare(array $args = array())
{
parent::prepare($args);
common_ensure_session();
/* 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'];
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;
}
- function handle($args)
+ function handle()
{
- parent::handle($args);
+ parent::handle();
if($_SERVER['REQUEST_METHOD'] == 'POST'){
$this->handleSubmit();
}else{
function handleSubmit()
{
+ global $_PEAR;
+
unset($_SESSION['openid_trust_root']);
unset($_SESSION['openid_allow_url']);
unset($_SESSION['openid_deny_url']);
$user_openid_trustroot->trustroot = $this->trust_root;
$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{