diff options
author | tailor <cygnus@janrain.com> | 2007-09-25 18:56:38 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2007-09-25 18:56:38 +0000 |
commit | b5e5cd7c3f57c915f16829c95a4cf681032885ee (patch) | |
tree | d604f2ef6dd10281d4c3019975a951f8d9bdfdb5 /Auth/OpenID/SQLStore.php | |
parent | b914968d4fcb08550ef0ace91f99f7cd7e212ae0 (diff) | |
download | php-openid-b5e5cd7c3f57c915f16829c95a4cf681032885ee.zip php-openid-b5e5cd7c3f57c915f16829c95a4cf681032885ee.tar.gz php-openid-b5e5cd7c3f57c915f16829c95a4cf681032885ee.tar.bz2 |
[project @ Added store methods cleanupAssociations(), cleanup(), and concrete implementations]
Diffstat (limited to 'Auth/OpenID/SQLStore.php')
-rw-r--r-- | Auth/OpenID/SQLStore.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Auth/OpenID/SQLStore.php b/Auth/OpenID/SQLStore.php index 4192022..15f7971 100644 --- a/Auth/OpenID/SQLStore.php +++ b/Auth/OpenID/SQLStore.php @@ -265,7 +265,8 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore { 'get_assoc', 'get_assocs', 'remove_assoc', - 'get_expired') + 'get_expired', + 'clean_assoc') ) ); @@ -570,6 +571,15 @@ class Auth_OpenID_SQLStore extends Auth_OpenID_OpenIDStore { $this->connection->commit(); return $num; } + + function cleanupAssociations() + { + $this->connection->query($this->sql['clean_assoc'], + array(time())); + $num = $this->connection->affectedRows(); + $this->connection->commit(); + return $num; + } } ?> |