cvs: pear /Auth Auth.php
| From: | Martin Jansen | Date: | Sat, 22 Dec 2001 14:37:51 +0000 |
| Subject: | cvs: pear /Auth Auth.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-1658@lists.php.net to get a copy of this message | ||
mj Sat Dec 22 09:37:51 2001 EDT
Modified files:
/pear/Auth Auth.php
Log:
* Remove _setAuth which is not needed and was introduced by last commit.
* Slight PHPDoc fix.
* Change '' to "".
Index: pear/Auth/Auth.php
diff -u pear/Auth/Auth.php:1.20 pear/Auth/Auth.php:1.21
--- pear/Auth/Auth.php:1.20 Sat Dec 22 08:20:45 2001
+++ pear/Auth/Auth.php Sat Dec 22 09:37:51 2001
@@ -16,7 +16,7 @@
// | Authors: Martin Jansen <mj@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Auth.php,v 1.20 2001/12/22 13:20:45 mj Exp $
+// $Id: Auth.php,v 1.21 2001/12/22 14:37:51 mj Exp $
//
/**
@@ -134,7 +134,7 @@
*
* @author Martin Jansen <mj@php.net>
* @package Auth
- * @version $Revision: 1.20 $
+ * @version $Revision: 1.21 $
*/
define("AUTH_IDLED", -1);
@@ -273,7 +273,7 @@
*/
function assignData()
{
- $post = &$this->_importGlobalVariable('post');
+ $post = &$this->_importGlobalVariable("post");
if ($post['username'] != "") {
$this->username = $post['username'];
@@ -424,7 +424,7 @@
if (isset($_SESSION)) {
if (!isset($_SESSION['auth'])) {
- session_register('auth');
+ session_register("auth");
}
$_SESSION['auth'] = array(
@@ -440,7 +440,7 @@
} else {
if (!isset($GLOBALS['HTTP_SESSION_VARS']['auth'])) {
- session_register('auth');
+ session_register("auth");
}
$GLOBALS['auth'] =
&$GLOBALS['HTTP_SESSION_VARS']['auth'];
@@ -455,23 +455,6 @@
}
}
- function _setAuth($username, $data = array())
- {
- if (!isset($GLOBALS['HTTP_SESSION_VARS']['auth'])) {
- session_register('auth');
- }
-
- $GLOBALS['auth'] =
&$GLOBALS['HTTP_SESSION_VARS']['auth'];
- $GLOBALS['auth']['registered'] = true;
- $GLOBALS['auth']['username'] = $username;
- $GLOBALS['auth']['timestamp'] = time();
- $GLOBALS['auth']['idle'] = time();
-
- if (count($data) > 0) {
- $GLOBALS['auth']['data'] = $data;
- }
- }
-
// }}}
// {{{ getAuth()
@@ -483,7 +466,7 @@
*/
function getAuth()
{
- $session = &$this->_importGlobalVariable('session');
+ $session = &$this->_importGlobalVariable("session");
return (true == $session['auth']['registered']) ? true : false;
}
@@ -672,6 +655,7 @@
/**
* Import variables from special namespaces.
*
+ * @access private
* @param string Type of variable (server, session, post)
* @return array
*/