diff options
Diffstat (limited to 'Auth')
-rw-r--r-- | Auth/OpenID.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Auth/OpenID.php b/Auth/OpenID.php index a56835a..e932f5e 100644 --- a/Auth/OpenID.php +++ b/Auth/OpenID.php @@ -96,14 +96,6 @@ define('Auth_OpenID_punct', "!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"); /** - * These namespaces are automatically fixed in query arguments by - * Auth_OpenID::fixArgs. - */ -global $_Auth_OpenID_namespaces; -$_Auth_OpenID_namespaces = array('openid', - 'sreg'); - -/** * The OpenID utility function class. * * @package OpenID @@ -112,6 +104,16 @@ $_Auth_OpenID_namespaces = array('openid', class Auth_OpenID { /** + * These namespaces are automatically fixed in query arguments by + * Auth_OpenID::fixArgs. + */ + function getOpenIDNamespaces() + { + return array('openid', + 'sreg'); + } + + /** * Rename query arguments back to 'openid.' from 'openid_' * * @access private @@ -119,11 +121,10 @@ class Auth_OpenID { */ function fixArgs($args) { - global $_Auth_OpenID_namespaces; foreach (array_keys($args) as $key) { $fixed = $key; if (preg_match('/^openid/', $key)) { - foreach ($_Auth_OpenID_namespaces as $ns) { + foreach (Auth_OpenID::getOpenIDNamespaces() as $ns) { if (preg_match('/'.$ns.'_/', $key)) { $fixed = preg_replace('/'.$ns.'_/', $ns.'.', $fixed); } |