diff options
author | tailor <cygnus@janrain.com> | 2006-02-14 00:58:03 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-02-14 00:58:03 +0000 |
commit | 080b9a9473492e641dbce7efac47f67e819d2ac1 (patch) | |
tree | 6f5110d6ae6a814d6c6691d0dc98f4c92c087d1c /Auth/OpenID | |
parent | 3153199056959f2fcdc59b3bbb9e8a2c36eeed76 (diff) | |
download | php-openid-080b9a9473492e641dbce7efac47f67e819d2ac1.zip php-openid-080b9a9473492e641dbce7efac47f67e819d2ac1.tar.gz php-openid-080b9a9473492e641dbce7efac47f67e819d2ac1.tar.bz2 |
[project @ Moved fixArgs from Util to OpenID]
Diffstat (limited to 'Auth/OpenID')
-rw-r--r-- | Auth/OpenID/Consumer.php | 2 | ||||
-rw-r--r-- | Auth/OpenID/Server.php | 4 | ||||
-rw-r--r-- | Auth/OpenID/Util.php | 20 |
3 files changed, 3 insertions, 23 deletions
diff --git a/Auth/OpenID/Consumer.php b/Auth/OpenID/Consumer.php index f27972c..caf1b52 100644 --- a/Auth/OpenID/Consumer.php +++ b/Auth/OpenID/Consumer.php @@ -508,7 +508,7 @@ class Auth_OpenID_Consumer { */ function completeAuth($token, $query) { - $query = Auth_OpenID_fixArgs($query); + $query = Auth_OpenID::fixArgs($query); $mode = Auth_OpenID_arrayGet($query, 'openid.mode', ''); diff --git a/Auth/OpenID/Server.php b/Auth/OpenID/Server.php index 466f8ab..b27b36b 100644 --- a/Auth/OpenID/Server.php +++ b/Auth/OpenID/Server.php @@ -113,14 +113,14 @@ class Auth_OpenID_Server { case 'GET': // Convert anything that starts with openid_ to openid. if ($args === null) { - $args = Auth_OpenID_fixArgs($_GET); + $args = Auth_OpenID::fixArgs($_GET); } $request = new Auth_OpenID_ServerRequest($this->server_url, $args); return $request->retry(&$this, $is_authorized); case 'POST': if ($args === null) { - $args = Auth_OpenID_fixArgs($_POST); + $args = Auth_OpenID::fixArgs($_POST); } $mode = $args['openid.mode']; switch ($mode) { diff --git a/Auth/OpenID/Util.php b/Auth/OpenID/Util.php index 67ba691..8bed09b 100644 --- a/Auth/OpenID/Util.php +++ b/Auth/OpenID/Util.php @@ -61,26 +61,6 @@ function Auth_OpenID_arrayGet($arr, $key, $fallback = null) } /** - * Rename query arguments back to 'openid.' from 'openid_' - * - * @access private - * @param array $args An associative array of URL query arguments - */ -function Auth_OpenID_fixArgs($args) -{ - foreach (array_keys($args) as $key) { - $fixed = preg_replace('/^openid_/', 'openid.', $key); - if ($fixed != $key) { - $val = $args[$key]; - unset($args[$key]); - $args[$fixed] = $val; - } - } - - return $args; -} - -/** * Implements the PHP 5 'http_build_query' functionality. * * @access private |