summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2006-01-24 22:25:37 +0000
committertailor <cygnus@janrain.com>2006-01-24 22:25:37 +0000
commitdcf9e87006cbbaf3b22665ee6c57ee40684b1699 (patch)
tree80538271d8c8c113188a2cd826779173a23a7e94 /examples
parentbc14e9b0c1443ad09a44c6b27812ae9c116d78f9 (diff)
downloadphp-openid-dcf9e87006cbbaf3b22665ee6c57ee40684b1699.zip
php-openid-dcf9e87006cbbaf3b22665ee6c57ee40684b1699.tar.gz
php-openid-dcf9e87006cbbaf3b22665ee6c57ee40684b1699.tar.bz2
[project @ Removed requirement for OIDUtil.php from example consumer script.]
Diffstat (limited to 'examples')
-rw-r--r--examples/consumer.php18
1 files changed, 3 insertions, 15 deletions
diff --git a/examples/consumer.php b/examples/consumer.php
index 4a69b37..4eef5b8 100644
--- a/examples/consumer.php
+++ b/examples/consumer.php
@@ -6,11 +6,9 @@
*/
/**
- * Require files to use the OpenID consumer. We need the consumer
- * itself, an OpenID store implementation, and some utility functions.
+ * Require the OpenID consumer code.
*/
require_once "Auth/OpenID/Consumer/Consumer.php";
-require_once "Auth/OpenID/OIDUtil.php";
/**
* Create the OpenID store and consumer objects, which we'll use to
@@ -37,12 +35,7 @@ if ($store_type == 'sqlite') {
*/
$store_path = "/tmp/_php_consumer_test";
-
- /**
- * Try to create the store directory. ensureDir is provided by
- * OIDUtil.php.
- */
- if (!ensureDir($store_path)) {
+ if (!file_exists($store_path) && !mkdir($store_path)) {
print "Could not create the SQLiteStore directory '$store_path'. ".
" Please check the effective permissions.";
exit(0);
@@ -142,12 +135,7 @@ if ($store_type == 'sqlite') {
*/
$store_path = "/tmp/_php_consumer_test";
-
- /**
- * Try to create the store directory. ensureDir is provided by
- * OIDUtil.php.
- */
- if (!ensureDir($store_path)) {
+ if (!file_exists($store_path) && !mkdir($store_path)) {
print "Could not create the FileStore directory '$store_path'. ".
" Please check the effective permissions.";
exit(0);