cvs: pear /LiveUser/Auth DB.php MDB.php MDB2.php

From: Date: Mon, 15 Aug 2005 12:01:31 +0000
Subject: cvs: pear /LiveUser/Auth DB.php MDB.php MDB2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33981@lists.php.net to get a copy of this message
lsmith Mon Aug 15 08:01:31 2005 EDT Modified files: /pear/LiveUser/Auth DB.php MDB.php MDB2.php Log: - cosmetic fix ($sql => $query)

http://cvs.php.net/diff.php/pear/LiveUser/Auth/DB.php?r1=1.21&r2=1.22&ty=u Index: pear/LiveUser/Auth/DB.php diff -u pear/LiveUser/Auth/DB.php:1.21 pear/LiveUser/Auth/DB.php:1.22 --- pear/LiveUser/Auth/DB.php:1.21 Mon Aug 15 06:47:23 2005 +++ pear/LiveUser/Auth/DB.php Mon Aug 15 08:01:29 2005 @@ -40,7 +40,7 @@ * @author Bjoern Kraus <krausbn@php.net> * @copyright 2002-2005 Markus Wolff * @license http://www.gnu.org/licenses/lgpl.txt - * @version CVS: $Id: DB.php,v 1.21 2005/08/15 10:47:23 lsmith Exp $ + * @version CVS: $Id: DB.php,v 1.22 2005/08/15 12:01:29 lsmith Exp $ * @link http://pear.php.net/LiveUser */ @@ -152,13 +152,13 @@ return true; } - $sql = 'UPDATE ' . $this->prefix . $this->alias['users'].' + $query = 'UPDATE ' . $this->prefix . $this->alias['users'].' SET ' . $this->alias['lastlogin'] . '=' . $this->dbc->quoteSmart(date('Y-m-d H:i:s', $this->currentLogin)) . ' WHERE ' . $this->alias['auth_user_id'] . '=' . $this->dbc->quoteSmart($this->propertyValues['auth_user_id']); - $result = $this->dbc->query($sql); + $result = $this->dbc->query($query); if (PEAR::isError($result)) { $this->_stack->push( @@ -199,26 +199,26 @@ } // Setting the default sql query. - $sql = 'SELECT ' . implode(',', $fields) . ' + $query = 'SELECT ' . implode(',', $fields) . ' FROM ' . $this->prefix . $this->alias['users'].' WHERE '; if ($auth_user_id) { - $sql .= $this->alias['auth_user_id'] . '=' + $query .= $this->alias['auth_user_id'] . '=' . $this->dbc->quoteSmart($this->propertyValues['auth_user_id']); } else { - $sql .= $this->alias['handle'] . '=' + $query .= $this->alias['handle'] . '=' . $this->dbc->quoteSmart($handle); if ($this->tables['users']['fields']['passwd']) { // If $passwd is set, try to find the first user with the given // handle and password. - $sql .= ' AND ' . $this->alias['passwd'] . '=' + $query .= ' AND ' . $this->alias['passwd'] . '=' . $this->dbc->quoteSmart($this->encryptPW($passwd)); } } // Query database - $result = $this->dbc->getRow($sql, null, DB_FETCHMODE_ASSOC); + $result = $this->dbc->getRow($query, null, DB_FETCHMODE_ASSOC); if (PEAR::isError($result)) { // If a user was found, read data into class variables and set http://cvs.php.net/diff.php/pear/LiveUser/Auth/MDB.php?r1=1.23&r2=1.24&ty=u Index: pear/LiveUser/Auth/MDB.php diff -u pear/LiveUser/Auth/MDB.php:1.23 pear/LiveUser/Auth/MDB.php:1.24 --- pear/LiveUser/Auth/MDB.php:1.23 Mon Aug 15 06:47:23 2005 +++ pear/LiveUser/Auth/MDB.php Mon Aug 15 08:01:29 2005 @@ -40,7 +40,7 @@ * @author Bjoern Kraus <krausbn@php.net> * @copyright 2002-2005 Markus Wolff * @license http://www.gnu.org/licenses/lgpl.txt - * @version CVS: $Id: MDB.php,v 1.23 2005/08/15 10:47:23 lsmith Exp $ + * @version CVS: $Id: MDB.php,v 1.24 2005/08/15 12:01:29 lsmith Exp $ * @link http://pear.php.net/LiveUser */ @@ -161,13 +161,13 @@ return true; } - $sql = 'UPDATE ' . $this->prefix . $this->alias['users'].' + $query = 'UPDATE ' . $this->prefix . $this->alias['users'].' SET ' . $this->alias['lastlogin'] .'=' . $this->dbc->getValue($this->fields['lastlogin'], MDB_Date::unix2Mdbstamp($this->currentLogin)) . ' WHERE ' . $this->alias['auth_user_id'] .'=' . $this->dbc->getValue($this->fields['auth_user_id'], $this->propertyValues['auth_user_id']); - $result = $this->dbc->query($sql); + $result = $this->dbc->query($query); if (PEAR::isError($result)) { $this->_stack->push( @@ -209,26 +209,26 @@ } // Setting the default query. - $sql = 'SELECT ' . implode(',', $fields) . ' + $query = 'SELECT ' . implode(',', $fields) . ' FROM ' . $this->prefix . $this->alias['users'] . ' WHERE '; if ($auth_user_id) { - $sql .= $this->alias['auth_user_id'] . '=' + $query .= $this->alias['auth_user_id'] . '=' . $this->dbc->getValue($this->fields['auth_user_id'], $this->propertyValues['auth_user_id']); } else { - $sql .= $this->alias['handle'] . '=' + $query .= $this->alias['handle'] . '=' . $this->dbc->getValue($this->fields['handle'], $handle); if ($this->tables['users']['fields']['passwd']) { // If $passwd is set, try to find the first user with the given // handle and password. - $sql .= ' AND ' . $this->alias['passwd'] . '=' + $query .= ' AND ' . $this->alias['passwd'] . '=' . $this->dbc->getValue($this->fields['passwd'], $this->encryptPW($passwd)); } } // Query database - $result = $this->dbc->queryRow($sql, $types, MDB_FETCHMODE_ASSOC); + $result = $this->dbc->queryRow($query, $types, MDB_FETCHMODE_ASSOC); // If a user was found, read data into class variables and set // return value to true http://cvs.php.net/diff.php/pear/LiveUser/Auth/MDB2.php?r1=1.24&r2=1.25&ty=u Index: pear/LiveUser/Auth/MDB2.php diff -u pear/LiveUser/Auth/MDB2.php:1.24 pear/LiveUser/Auth/MDB2.php:1.25 --- pear/LiveUser/Auth/MDB2.php:1.24 Mon Aug 15 06:47:23 2005 +++ pear/LiveUser/Auth/MDB2.php Mon Aug 15 08:01:29 2005 @@ -40,7 +40,7 @@ * @author Bjoern Kraus <krausbn@php.net> * @copyright 2002-2005 Markus Wolff * @license http://www.gnu.org/licenses/lgpl.txt - * @version CVS: $Id: MDB2.php,v 1.24 2005/08/15 10:47:23 lsmith Exp $ + * @version CVS: $Id: MDB2.php,v 1.25 2005/08/15 12:01:29 lsmith Exp $ * @link http://pear.php.net/LiveUser */ @@ -161,13 +161,13 @@ return true; } - $sql = 'UPDATE ' . $this->prefix . $this->alias['users'].' + $query = 'UPDATE ' . $this->prefix . $this->alias['users'].' SET ' . $this->alias['lastlogin'] .'=' . $this->dbc->quote(MDB2_Date::unix2Mdbstamp($this->currentLogin), $this->fields['lastlogin']) . ' WHERE ' . $this->alias['auth_user_id'] .'=' . $this->dbc->quote($this->propertyValues['auth_user_id'], $this->fields['auth_user_id']); - $result = $this->dbc->query($sql); + $result = $this->dbc->query($query); if (PEAR::isError($result)) { $this->_stack->push( @@ -210,26 +210,26 @@ } // Setting the default query. - $sql = 'SELECT ' . implode(',', $fields) . ' + $query = 'SELECT ' . implode(',', $fields) . ' FROM ' . $this->prefix . $this->alias['users'] . ' WHERE '; if ($auth_user_id) { - $sql .= $this->alias['auth_user_id'] . '=' + $query .= $this->alias['auth_user_id'] . '=' . $this->dbc->quote($this->propertyValues['auth_user_id'], $this->fields['auth_user_id']); } else { - $sql .= $this->alias['handle'] . '=' + $query .= $this->alias['handle'] . '=' . $this->dbc->quote($handle, $this->fields['handle']); if ($this->tables['users']['fields']['passwd']) { // If $passwd is set, try to find the first user with the given // handle and password. - $sql .= ' AND ' . $this->alias['passwd'] . '=' + $query .= ' AND ' . $this->alias['passwd'] . '=' . $this->dbc->quote($this->encryptPW($passwd), $this->fields['passwd']); } } // Query database - $result = $this->dbc->queryRow($sql, $types, MDB2_FETCHMODE_ASSOC); + $result = $this->dbc->queryRow($query, $types, MDB2_FETCHMODE_ASSOC); // If a user was found, read data into class variables and set // return value to true
« previous php.pear.cvs (#33981) next »