summaryrefslogtreecommitdiffstats
path: root/Auth/OpenID/Store
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2006-01-18 21:38:15 +0000
committertailor <cygnus@janrain.com>2006-01-18 21:38:15 +0000
commit5a390e4a940c2bf3e5aaabd32c6fe4893a2c4626 (patch)
treee634c3dca044fc5e61b789cd3553429999fde290 /Auth/OpenID/Store
parentbbd89e668f542ab206eb62225a7af0f747e8f679 (diff)
downloadphp-openid-5a390e4a940c2bf3e5aaabd32c6fe4893a2c4626.zip
php-openid-5a390e4a940c2bf3e5aaabd32c6fe4893a2c4626.tar.gz
php-openid-5a390e4a940c2bf3e5aaabd32c6fe4893a2c4626.tar.bz2
[project @ Moved ensureDir function to OIDUtil and updated example script]
Diffstat (limited to 'Auth/OpenID/Store')
-rw-r--r--Auth/OpenID/Store/FileStore.php22
1 files changed, 4 insertions, 18 deletions
diff --git a/Auth/OpenID/Store/FileStore.php b/Auth/OpenID/Store/FileStore.php
index 9505dc9..a45240b 100644
--- a/Auth/OpenID/Store/FileStore.php
+++ b/Auth/OpenID/Store/FileStore.php
@@ -135,20 +135,6 @@ function _removeIfPresent($filename)
}
/**
- * Create dir_name as a directory if it does not exist. If it exists,
- * make sure that it is, in fact, a directory. Returns true if the
- * operation succeeded; false if not.
- */
-function _ensureDir($dir_name)
-{
- if (@mkdir($dir_name) || is_dir($dir_name)) {
- return true;
- } else {
- return false;
- }
-}
-
-/**
* This is a filesystem-based store for OpenID associations and
* nonces. This store should be safe for use in concurrent systems on
* both windows and unix (excluding NFS filesystems). There are a
@@ -212,10 +198,10 @@ class Auth_OpenID_FileStore extends Auth_OpenID_OpenIDStore {
*/
function _setup()
{
- _ensureDir(dirname($this->auth_key_name));
- _ensureDir($this->nonce_dir);
- _ensureDir($this->association_dir);
- _ensureDir($this->temp_dir);
+ ensureDir(dirname($this->auth_key_name));
+ ensureDir($this->nonce_dir);
+ ensureDir($this->association_dir);
+ ensureDir($this->temp_dir);
}
/**