cvs: pear /Auth/Container DB.php

From: Date: Tue, 18 Oct 2005 07:05:35 +0000
Subject: cvs: pear /Auth/Container DB.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-35661@lists.php.net to get a copy of this message
quipo Tue Oct 18 03:05:35 2005 EDT Modified files: /pear/Auth/Container DB.php Log: - renamed supportsChallengeResponce() to supportsChallengeResponse() - fixed typos in phpdoc comments / internal variables - WS fixes http://cvs.php.net/diff.php/pear/Auth/Container/DB.php?r1=1.51&r2=1.52&ty=u Index: pear/Auth/Container/DB.php diff -u pear/Auth/Container/DB.php:1.51 pear/Auth/Container/DB.php:1.52 --- pear/Auth/Container/DB.php:1.51 Mon Aug 30 07:58:52 2004 +++ pear/Auth/Container/DB.php Tue Oct 18 03:05:32 2005 @@ -16,7 +16,7 @@ // | Authors: Martin Jansen <mj@php.net> | // +----------------------------------------------------------------------+ // -// $Id: DB.php,v 1.51 2004/08/30 11:58:52 yavo Exp $ +// $Id: DB.php,v 1.52 2005/10/18 07:05:32 quipo Exp $ // require_once 'Auth/Container.php'; @@ -30,7 +30,7 @@ * * @author Martin Jansen <mj@php.net> * @package Auth - * @version $Revision: 1.51 $ + * @version $Revision: 1.52 $ */ class Auth_Container_DB extends Auth_Container { @@ -210,12 +210,12 @@ * @param string Password * @param boolean If true password is secured using a md5 hash * the frontend and auth are responsible for making sure the container supports - * challenge response password authenthication + * challenge response password authentication * @return mixed Error object or boolean */ - function fetchData($username, $password, $isChallengeResponce=false) + function fetchData($username, $password, $isChallengeResponse=false) { - //print "Container_DB::fetchData($username, $password, $isChallengeResponce) <br/>\n"; + //print "Container_DB::fetchData($username, $password, $isChallengeResponse) <br/>\n"; // Prepare for a database query $err = $this->_prepare(); if ($err !== true) { @@ -229,12 +229,12 @@ else{ $sql_from = $this->options['usernamecol'] . ", ".$this->options['passwordcol'].$this->options['db_fields']; } - /** - Old Style, removed to go around the oci8 - problem + /* + Old Style, removed to go around the oci8 + problem See bug 206 http://pear.php.net/bugs/bug.php?id=206 - + $query = "SELECT ! FROM ! WHERE ! = ?"; $query_params = array( $sql_from, @@ -243,11 +243,11 @@ $username ); */ - + $query = "SELECT ".$sql_from. " FROM ".$this->options['table']. " WHERE ".$this->options['usernamecol']." = '".$this->db->quoteString($username)."'"; - + $res = $this->db->getRow($query, null, DB_FETCHMODE_ASSOC); #print "SQL: $query <br/>\n"; #print_r($res); @@ -259,12 +259,12 @@ $this->activeUser = ''; return false; } - + // Perform trimming here before the hashihg $password = trim($password, "\r\n"); $res[$this->options['passwordcol']] = trim($res[$this->options['passwordcol']], "\r\n"); - // If using Challenge Responce md5 the pass with the secret - if ($isChallengeResponce) { + // If using Challenge Response md5 the pass with the secret + if ($isChallengeResponse) { $res[$this->options['passwordcol']] = md5($res[$this->options['passwordcol']].$this->_auth_obj->session['loginchallenege']); // UGLY cannot avoid without modifying verifyPassword if ($this->options['cryptType'] == 'md5') { @@ -292,11 +292,11 @@ } /** - * Returns a list of users from the container - * - * @return mixed - * @access public - */ + * Returns a list of users from the container + * + * @return mixed + * @access public + */ function listUsers() { $err = $this->_prepare(); @@ -349,7 +349,7 @@ } else { $cryptFunction = 'md5'; } - + $password = $cryptFunction($password); $additional_key = ''; @@ -421,7 +421,7 @@ } else { $cryptFunction = 'md5'; } - + $password = $cryptFunction($password); $query = sprintf("UPDATE %s SET %s = '%s' WHERE %s = '%s'", @@ -442,17 +442,17 @@ } /** - * Determine if this container supports - * password authenthication with challenge responce - * - * @return bool - * @access public - */ - function supportsChallengeResponce() + * Determine if this container supports + * password authentication with challenge response + * + * @return bool + * @access public + */ + function supportsChallengeResponse() { return in_array($this->options['cryptType'], array('md5', 'none', '')); } - + /** * Returns the selected crypt type for this container */ @@ -460,6 +460,6 @@ { return($this->options['cryptType']); } - + } ?>

« previous php.pear.cvs (#35661) next »