diff options
Diffstat (limited to 'Auth/OpenID')
-rw-r--r-- | Auth/OpenID/Association.php | 2 | ||||
-rw-r--r-- | Auth/OpenID/BigMath.php | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/Auth/OpenID/Association.php b/Auth/OpenID/Association.php index 1bfe403..4d3ac33 100644 --- a/Auth/OpenID/Association.php +++ b/Auth/OpenID/Association.php @@ -423,7 +423,7 @@ function Auth_OpenID_getDefaultAssociationOrder() { $order = array(); - if (!defined('Auth_OpenID_NO_MATH_SUPPORT')) { + if (!Auth_OpenID_noMathSupport()) { $order[] = array('HMAC-SHA1', 'DH-SHA1'); if (Auth_OpenID_HMACSHA256_SUPPORTED) { diff --git a/Auth/OpenID/BigMath.php b/Auth/OpenID/BigMath.php index 40de144..98815f5 100644 --- a/Auth/OpenID/BigMath.php +++ b/Auth/OpenID/BigMath.php @@ -427,7 +427,7 @@ function &Auth_OpenID_getMathLib() return $lib; } - if (defined('Auth_OpenID_NO_MATH_SUPPORT')) { + if (Auth_OpenID_noMathSupport()) { $null = null; return $null; } @@ -443,7 +443,7 @@ function &Auth_OpenID_getMathLib() } $triedstr = implode(", ", $tried); - define('Auth_OpenID_NO_MATH_SUPPORT', true); + Auth_OpenID_setNoMathSupport(); $result = null; return $result; @@ -456,4 +456,16 @@ function &Auth_OpenID_getMathLib() return $lib; } +function Auth_OpenID_setNoMathSupport() +{ + if (!defined('Auth_OpenID_NO_MATH_SUPPORT')) { + define('Auth_OpenID_NO_MATH_SUPPORT', true); + } +} + +function Auth_OpenID_noMathSupport() +{ + return defined('Auth_OpenID_NO_MATH_SUPPORT'); +} + ?> |