cvs: pear /Auth package2.xml /Auth/Container DB.php DBLite.php MDB.php MDB2.php
| From: | Adam Ashley | Date: | Wed, 03 Oct 2007 01:51:37 +0000 |
| Subject: | cvs: pear /Auth package2.xml /Auth/Container DB.php DBLite.php MDB.php MDB2.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-48742@lists.php.net to get a copy of this message | ||
aashley Wed Oct 3 01:51:37 2007 UTC
Modified files:
/pear/Auth package2.xml
/pear/Auth/Container DB.php DBLite.php MDB.php MDB2.php
Log:
Implemented Request #12061: Auto Quote handle database schema changes. ie schema.tableName ->
"schema"."tableName"
http://cvs.php.net/viewvc.cgi/pear/Auth/package2.xml?r1=1.36&r2=1.37&diff_format=u Index: pear/Auth/package2.xml diff -u pear/Auth/package2.xml:1.36 pear/Auth/package2.xml:1.37 --- pear/Auth/package2.xml:1.36 Wed Sep 26 03:33:35 2007 +++ pear/Auth/package2.xml Wed Oct 3 01:51:37 2007 @@ -70,6 +70,8 @@ </stability> <license uri="http://www.php.net/license">PHP License</license> <notes> + * Implemented Request #12061: Auto Quote handle database schema changes. ie + schema.tableName -> "schema"."tableName" * Implemented Request #12087: Ability to select which Advanced Security options are used. </notes> @@ -272,34 +274,34 @@ <changelog> <release> <date>2007-07-02</date> - <time>10:35:00</time> - <version> - <release>1.5.4</release> - <api>1.5.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.php.net/license">PHP License</license> - <notes> + <time>10:35:00</time> + <version> + <release>1.5.4</release> + <api>1.5.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.php.net/license">PHP License</license> + <notes> * Fixed Bug #11499: Redundant parameter in Auth_Container_SOAP5::_validateOptions() - definition. Thanks to Koles Mihaly for spotting this. - </notes> + definition. Thanks to Koles Mihaly for spotting this. + </notes> </release> - <release> - <date>2007-07-02</date> - <time>10:35:00</time> - <version> - <release>1.5.3</release> - <api>1.5.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.php.net/license">PHP License</license> - <notes> + <release> + <date>2007-07-02</date> + <time>10:35:00</time> + <version> + <release>1.5.3</release> + <api>1.5.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.php.net/license">PHP License</license> + <notes> * Fixed Bug: If Auth::setSessionName() is called new session name variable is not initialised so checks for session storage fail. * Fixed Bug #11396: Auth_Container_Pear doesn't work with latest changes to @@ -307,8 +309,8 @@ * Fixed Bug #11476: SOAP5 container's _validateOptions() and _setDefaults() functions where setting options into the wrong object parameter. Thanks to Köles Mihály for fix. - </notes> - </release> + </notes> + </release> <release> <date>2007-06-12</date> <time>10:35:00</time> http://cvs.php.net/viewvc.cgi/pear/Auth/Container/DB.php?r1=1.72&r2=1.73&diff_format=u Index: pear/Auth/Container/DB.php diff -u pear/Auth/Container/DB.php:1.72 pear/Auth/Container/DB.php:1.73 --- pear/Auth/Container/DB.php:1.72 Tue Jun 12 03:11:26 2007 +++ pear/Auth/Container/DB.php Wed Oct 3 01:51:37 2007 @@ -18,7 +18,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: DB.php,v 1.72 2007/06/12 03:11:26 aashley Exp $ + * @version CVS: $Id: DB.php,v 1.73 2007/10/03 01:51:37 aashley Exp $ * @link http://pear.php.net/package/Auth */ @@ -43,7 +43,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.72 $ + * @version Release: @package_version@ File: $Revision: 1.73 $ * @link http://pear.php.net/package/Auth */ class Auth_Container_DB extends Auth_Container @@ -154,7 +154,14 @@ } } if ($this->options['auto_quote'] && $this->db->dsn['phptype'] != 'sqlite') { - $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + if (strpos('.', $this->options['table']) === false)) { + $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + } else { + $t = explode('.', $this->options['table']); + for ($i = 0, $count = count($t); $i < $count; $i++) + $t[$i] = $this->db->quoteIdentifier($t[$i]); + $this->options['final_table'] = implode('.', $t); + } $this->options['final_usernamecol'] = $this->db->quoteIdentifier($this->options['usernamecol']); $this->options['final_passwordcol'] = $this->db->quoteIdentifier($this->options['passwordcol']); } else { http://cvs.php.net/viewvc.cgi/pear/Auth/Container/DBLite.php?r1=1.18&r2=1.19&diff_format=u Index: pear/Auth/Container/DBLite.php diff -u pear/Auth/Container/DBLite.php:1.18 pear/Auth/Container/DBLite.php:1.19 --- pear/Auth/Container/DBLite.php:1.18 Tue Jun 12 03:11:26 2007 +++ pear/Auth/Container/DBLite.php Wed Oct 3 01:51:37 2007 @@ -18,7 +18,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: DBLite.php,v 1.18 2007/06/12 03:11:26 aashley Exp $ + * @version CVS: $Id: DBLite.php,v 1.19 2007/10/03 01:51:37 aashley Exp $ * @link http://pear.php.net/package/Auth * @since File available since Release 1.3.0 */ @@ -45,7 +45,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.18 $ + * @version Release: @package_version@ File: $Revision: 1.19 $ * @link http://pear.php.net/package/Auth * @since Class available since Release 1.3.0 */ @@ -155,7 +155,14 @@ } } if ($this->options['auto_quote'] && $this->db->dsn['phptype'] != 'sqlite') { - $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + if (strpos('.', $this->options['table']) === false)) { + $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + } else { + $t = explode('.', $this->options['table']); + for ($i = 0, $count = count($t); $i < $count; $i++) + $t[$i] = $this->db->quoteIdentifier($t[$i]); + $this->options['final_table'] = implode('.', $t); + } $this->options['final_usernamecol'] = $this->db->quoteIdentifier($this->options['usernamecol']); $this->options['final_passwordcol'] = $this->db->quoteIdentifier($this->options['passwordcol']); } else { http://cvs.php.net/viewvc.cgi/pear/Auth/Container/MDB.php?r1=1.35&r2=1.36&diff_format=u Index: pear/Auth/Container/MDB.php diff -u pear/Auth/Container/MDB.php:1.35 pear/Auth/Container/MDB.php:1.36 --- pear/Auth/Container/MDB.php:1.35 Tue Jun 12 03:11:26 2007 +++ pear/Auth/Container/MDB.php Wed Oct 3 01:51:37 2007 @@ -18,7 +18,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: MDB.php,v 1.35 2007/06/12 03:11:26 aashley Exp $ + * @version CVS: $Id: MDB.php,v 1.36 2007/10/03 01:51:37 aashley Exp $ * @link http://pear.php.net/package/Auth * @since File available since Release 1.2.3 */ @@ -44,7 +44,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.35 $ + * @version Release: @package_version@ File: $Revision: 1.36 $ * @link http://pear.php.net/package/Auth * @since Class available since Release 1.2.3 */ @@ -131,7 +131,14 @@ } if ($this->options['auto_quote']) { - $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + if (strpos('.', $this->options['table']) === false)) { + $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + } else { + $t = explode('.', $this->options['table']); + for ($i = 0, $count = count($t); $i < $count; $i++) + $t[$i] = $this->db->quoteIdentifier($t[$i]); + $this->options['final_table'] = implode('.', $t); + } $this->options['final_usernamecol'] = $this->db->quoteIdentifier($this->options['usernamecol']); $this->options['final_passwordcol'] = $this->db->quoteIdentifier($this->options['passwordcol']); } else { http://cvs.php.net/viewvc.cgi/pear/Auth/Container/MDB2.php?r1=1.22&r2=1.23&diff_format=u Index: pear/Auth/Container/MDB2.php diff -u pear/Auth/Container/MDB2.php:1.22 pear/Auth/Container/MDB2.php:1.23 --- pear/Auth/Container/MDB2.php:1.22 Tue Jun 12 03:11:26 2007 +++ pear/Auth/Container/MDB2.php Wed Oct 3 01:51:37 2007 @@ -18,7 +18,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: MDB2.php,v 1.22 2007/06/12 03:11:26 aashley Exp $ + * @version CVS: $Id: MDB2.php,v 1.23 2007/10/03 01:51:37 aashley Exp $ * @link http://pear.php.net/package/Auth * @since File available since Release 1.3.0 */ @@ -44,7 +44,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.22 $ + * @version Release: @package_version@ File: $Revision: 1.23 $ * @link http://pear.php.net/package/Auth * @since Class available since Release 1.3.0 */ @@ -131,7 +131,14 @@ } if ($this->options['auto_quote']) { - $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table'], true); + if (strpos('.', $this->options['table']) === false)) { + $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table'], true); + } else { + $t = explode('.', $this->options['table']); + for ($i = 0, $count = count($t); $i < $count; $i++) + $t[$i] = $this->db->quoteIdentifier($t[$i], true); + $this->options['final_table'] = implode('.', $t); + } $this->options['final_usernamecol'] = $this->db->quoteIdentifier($this->options['usernamecol'], true); $this->options['final_passwordcol'] = $this->db->quoteIdentifier($this->options['passwordcol'], true); } else {
http://cvs.php.net/viewvc.cgi/pear/Auth/package2.xml?r1=1.36&r2=1.37&diff_format=u Index: pear/Auth/package2.xml diff -u pear/Auth/package2.xml:1.36 pear/Auth/package2.xml:1.37 --- pear/Auth/package2.xml:1.36 Wed Sep 26 03:33:35 2007 +++ pear/Auth/package2.xml Wed Oct 3 01:51:37 2007 @@ -70,6 +70,8 @@ </stability> <license uri="http://www.php.net/license">PHP License</license> <notes> + * Implemented Request #12061: Auto Quote handle database schema changes. ie + schema.tableName -> "schema"."tableName" * Implemented Request #12087: Ability to select which Advanced Security options are used. </notes> @@ -272,34 +274,34 @@ <changelog> <release> <date>2007-07-02</date> - <time>10:35:00</time> - <version> - <release>1.5.4</release> - <api>1.5.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.php.net/license">PHP License</license> - <notes> + <time>10:35:00</time> + <version> + <release>1.5.4</release> + <api>1.5.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.php.net/license">PHP License</license> + <notes> * Fixed Bug #11499: Redundant parameter in Auth_Container_SOAP5::_validateOptions() - definition. Thanks to Koles Mihaly for spotting this. - </notes> + definition. Thanks to Koles Mihaly for spotting this. + </notes> </release> - <release> - <date>2007-07-02</date> - <time>10:35:00</time> - <version> - <release>1.5.3</release> - <api>1.5.0</api> - </version> - <stability> - <release>stable</release> - <api>stable</api> - </stability> - <license uri="http://www.php.net/license">PHP License</license> - <notes> + <release> + <date>2007-07-02</date> + <time>10:35:00</time> + <version> + <release>1.5.3</release> + <api>1.5.0</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.php.net/license">PHP License</license> + <notes> * Fixed Bug: If Auth::setSessionName() is called new session name variable is not initialised so checks for session storage fail. * Fixed Bug #11396: Auth_Container_Pear doesn't work with latest changes to @@ -307,8 +309,8 @@ * Fixed Bug #11476: SOAP5 container's _validateOptions() and _setDefaults() functions where setting options into the wrong object parameter. Thanks to Köles Mihály for fix. - </notes> - </release> + </notes> + </release> <release> <date>2007-06-12</date> <time>10:35:00</time> http://cvs.php.net/viewvc.cgi/pear/Auth/Container/DB.php?r1=1.72&r2=1.73&diff_format=u Index: pear/Auth/Container/DB.php diff -u pear/Auth/Container/DB.php:1.72 pear/Auth/Container/DB.php:1.73 --- pear/Auth/Container/DB.php:1.72 Tue Jun 12 03:11:26 2007 +++ pear/Auth/Container/DB.php Wed Oct 3 01:51:37 2007 @@ -18,7 +18,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: DB.php,v 1.72 2007/06/12 03:11:26 aashley Exp $ + * @version CVS: $Id: DB.php,v 1.73 2007/10/03 01:51:37 aashley Exp $ * @link http://pear.php.net/package/Auth */ @@ -43,7 +43,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.72 $ + * @version Release: @package_version@ File: $Revision: 1.73 $ * @link http://pear.php.net/package/Auth */ class Auth_Container_DB extends Auth_Container @@ -154,7 +154,14 @@ } } if ($this->options['auto_quote'] && $this->db->dsn['phptype'] != 'sqlite') { - $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + if (strpos('.', $this->options['table']) === false)) { + $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + } else { + $t = explode('.', $this->options['table']); + for ($i = 0, $count = count($t); $i < $count; $i++) + $t[$i] = $this->db->quoteIdentifier($t[$i]); + $this->options['final_table'] = implode('.', $t); + } $this->options['final_usernamecol'] = $this->db->quoteIdentifier($this->options['usernamecol']); $this->options['final_passwordcol'] = $this->db->quoteIdentifier($this->options['passwordcol']); } else { http://cvs.php.net/viewvc.cgi/pear/Auth/Container/DBLite.php?r1=1.18&r2=1.19&diff_format=u Index: pear/Auth/Container/DBLite.php diff -u pear/Auth/Container/DBLite.php:1.18 pear/Auth/Container/DBLite.php:1.19 --- pear/Auth/Container/DBLite.php:1.18 Tue Jun 12 03:11:26 2007 +++ pear/Auth/Container/DBLite.php Wed Oct 3 01:51:37 2007 @@ -18,7 +18,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: DBLite.php,v 1.18 2007/06/12 03:11:26 aashley Exp $ + * @version CVS: $Id: DBLite.php,v 1.19 2007/10/03 01:51:37 aashley Exp $ * @link http://pear.php.net/package/Auth * @since File available since Release 1.3.0 */ @@ -45,7 +45,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.18 $ + * @version Release: @package_version@ File: $Revision: 1.19 $ * @link http://pear.php.net/package/Auth * @since Class available since Release 1.3.0 */ @@ -155,7 +155,14 @@ } } if ($this->options['auto_quote'] && $this->db->dsn['phptype'] != 'sqlite') { - $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + if (strpos('.', $this->options['table']) === false)) { + $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + } else { + $t = explode('.', $this->options['table']); + for ($i = 0, $count = count($t); $i < $count; $i++) + $t[$i] = $this->db->quoteIdentifier($t[$i]); + $this->options['final_table'] = implode('.', $t); + } $this->options['final_usernamecol'] = $this->db->quoteIdentifier($this->options['usernamecol']); $this->options['final_passwordcol'] = $this->db->quoteIdentifier($this->options['passwordcol']); } else { http://cvs.php.net/viewvc.cgi/pear/Auth/Container/MDB.php?r1=1.35&r2=1.36&diff_format=u Index: pear/Auth/Container/MDB.php diff -u pear/Auth/Container/MDB.php:1.35 pear/Auth/Container/MDB.php:1.36 --- pear/Auth/Container/MDB.php:1.35 Tue Jun 12 03:11:26 2007 +++ pear/Auth/Container/MDB.php Wed Oct 3 01:51:37 2007 @@ -18,7 +18,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: MDB.php,v 1.35 2007/06/12 03:11:26 aashley Exp $ + * @version CVS: $Id: MDB.php,v 1.36 2007/10/03 01:51:37 aashley Exp $ * @link http://pear.php.net/package/Auth * @since File available since Release 1.2.3 */ @@ -44,7 +44,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.35 $ + * @version Release: @package_version@ File: $Revision: 1.36 $ * @link http://pear.php.net/package/Auth * @since Class available since Release 1.2.3 */ @@ -131,7 +131,14 @@ } if ($this->options['auto_quote']) { - $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + if (strpos('.', $this->options['table']) === false)) { + $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table']); + } else { + $t = explode('.', $this->options['table']); + for ($i = 0, $count = count($t); $i < $count; $i++) + $t[$i] = $this->db->quoteIdentifier($t[$i]); + $this->options['final_table'] = implode('.', $t); + } $this->options['final_usernamecol'] = $this->db->quoteIdentifier($this->options['usernamecol']); $this->options['final_passwordcol'] = $this->db->quoteIdentifier($this->options['passwordcol']); } else { http://cvs.php.net/viewvc.cgi/pear/Auth/Container/MDB2.php?r1=1.22&r2=1.23&diff_format=u Index: pear/Auth/Container/MDB2.php diff -u pear/Auth/Container/MDB2.php:1.22 pear/Auth/Container/MDB2.php:1.23 --- pear/Auth/Container/MDB2.php:1.22 Tue Jun 12 03:11:26 2007 +++ pear/Auth/Container/MDB2.php Wed Oct 3 01:51:37 2007 @@ -18,7 +18,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version CVS: $Id: MDB2.php,v 1.22 2007/06/12 03:11:26 aashley Exp $ + * @version CVS: $Id: MDB2.php,v 1.23 2007/10/03 01:51:37 aashley Exp $ * @link http://pear.php.net/package/Auth * @since File available since Release 1.3.0 */ @@ -44,7 +44,7 @@ * @author Adam Ashley <aashley@php.net> * @copyright 2001-2006 The PHP Group * @license http://www.php.net/license/3_01.txt PHP License 3.01 - * @version Release: @package_version@ File: $Revision: 1.22 $ + * @version Release: @package_version@ File: $Revision: 1.23 $ * @link http://pear.php.net/package/Auth * @since Class available since Release 1.3.0 */ @@ -131,7 +131,14 @@ } if ($this->options['auto_quote']) { - $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table'], true); + if (strpos('.', $this->options['table']) === false)) { + $this->options['final_table'] = $this->db->quoteIdentifier($this->options['table'], true); + } else { + $t = explode('.', $this->options['table']); + for ($i = 0, $count = count($t); $i < $count; $i++) + $t[$i] = $this->db->quoteIdentifier($t[$i], true); + $this->options['final_table'] = implode('.', $t); + } $this->options['final_usernamecol'] = $this->db->quoteIdentifier($this->options['usernamecol'], true); $this->options['final_passwordcol'] = $this->db->quoteIdentifier($this->options['passwordcol'], true); } else {