summaryrefslogtreecommitdiff
path: root/extlib/Auth/OpenID/SQLStore.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-06-29 10:24:48 -0400
committerBrion Vibber <brion@pobox.com>2010-06-29 10:24:48 -0400
commit2d920e05d563c9c327cf235b31ce18dfc4a83870 (patch)
tree31f3cde800220484cd242a8c4138c166307a2dea /extlib/Auth/OpenID/SQLStore.php
parent923d9ef71ce49bfa55460bf42acb8a35bf3e84be (diff)
Update the (formerly) Janrain OpenID library to 2.2.2 -- bug fixes including PHP 5.3 compatibility fix.
Upstream release was tagged at: http://github.com/openid/php-openid/commit/a287b2d85e753c84b3b883ed8ee3ffe8692c8477
Diffstat (limited to 'extlib/Auth/OpenID/SQLStore.php')
-rw-r--r--extlib/Auth/OpenID/SQLStore.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/extlib/Auth/OpenID/SQLStore.php b/extlib/Auth/OpenID/SQLStore.php
index da93c6aa2..c04059732 100644
--- a/extlib/Auth/OpenID/SQLStore.php
+++ b/extlib/Auth/OpenID/SQLStore.php
@@ -14,16 +14,6 @@
*/
/**
- * Require the PEAR DB module because we'll need it for the SQL-based
- * stores implemented here. We silence any errors from the inclusion
- * because it might not be present, and a user of the SQL stores may
- * supply an Auth_OpenID_DatabaseConnection instance that implements
- * its own storage.
- */
-global $__Auth_OpenID_PEAR_AVAILABLE;
-$__Auth_OpenID_PEAR_AVAILABLE = @include_once 'DB.php';
-
-/**
* @access private
*/
require_once 'Auth/OpenID/Interface.php';
@@ -89,8 +79,6 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore {
$associations_table = null,
$nonces_table = null)
{
- global $__Auth_OpenID_PEAR_AVAILABLE;
-
$this->associations_table_name = "oid_associations";
$this->nonces_table_name = "oid_nonces";
@@ -113,7 +101,7 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore {
// constant, so only try to use it if PEAR is present. Note
// that Auth_Openid_Databaseconnection instances need not
// implement ::setFetchMode for this reason.
- if ($__Auth_OpenID_PEAR_AVAILABLE) {
+ if (is_subclass_of($this->connection, 'db_common')) {
$this->connection->setFetchMode(DB_FETCHMODE_ASSOC);
}
@@ -482,7 +470,7 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore {
global $Auth_OpenID_SKEW;
if ( abs($timestamp - time()) > $Auth_OpenID_SKEW ) {
- return False;
+ return false;
}
return $this->_add_nonce($server_url, $timestamp, $salt);
@@ -566,4 +554,4 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore {
}
}
-?>
+