cvs: pear /DB package.xml /DB/DB mysql.php mysqli.php pgsql.php sqlite.php

From: Date: Wed, 02 Mar 2005 14:42:59 +0000
Subject: cvs: pear /DB package.xml /DB/DB mysql.php mysqli.php pgsql.php sqlite.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-29992@lists.php.net to get a copy of this message
danielc Wed Mar 2 09:42:59 2005 EDT Modified files: /pear/DB package.xml /pear/DB/DB mysql.php mysqli.php pgsql.php sqlite.php Log: * Make modifyLimitQuery() accommodate queries that already have ";" appended to them. Bug 3666. http://cvs.php.net/diff.php/pear/DB/package.xml?r1=1.176&r2=1.177&ty=u Index: pear/DB/package.xml diff -u pear/DB/package.xml:1.176 pear/DB/package.xml:1.177 --- pear/DB/package.xml:1.176 Tue Mar 1 15:22:03 2005 +++ pear/DB/package.xml Wed Mar 2 09:42:58 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> <package version="1.0"> - <!-- $Id: package.xml,v 1.176 2005/03/01 20:22:03 danielc Exp $ --> + <!-- $Id: package.xml,v 1.177 2005/03/02 14:42:58 danielc Exp $ --> <name>DB</name> <summary>Database Abstraction Layer</summary> <description> @@ -66,12 +66,14 @@ </maintainer> </maintainers> <release> - <version>1.7.1</version> + <version>1.7.2</version> <state>stable</state> - <date>2005-03-01</date> + <date>pending</date> <notes><![CDATA[ all: -* modifyLimitQuery() should not not modify the query if it already has a LIMIT clause. Bug 3663. +* Make modifyLimitQuery() accommodate + queries that already have ";" + appended to them. Bug 3666. ]]></notes> <filelist> <file name="DB.php" role="php" baseinstalldir="/"> http://cvs.php.net/diff.php/pear/DB/DB/mysql.php?r1=1.113&r2=1.114&ty=u Index: pear/DB/DB/mysql.php diff -u pear/DB/DB/mysql.php:1.113 pear/DB/DB/mysql.php:1.114 --- pear/DB/DB/mysql.php:1.113 Tue Mar 1 15:22:04 2005 +++ pear/DB/DB/mysql.php Wed Mar 2 09:42:58 2005 @@ -20,7 +20,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mysql.php,v 1.113 2005/03/01 20:22:04 danielc Exp $ + * @version CVS: $Id: mysql.php,v 1.114 2005/03/02 14:42:58 danielc Exp $ * @link http://pear.php.net/package/DB */ @@ -852,6 +852,10 @@ if (preg_match('/LIMIT\s*\d(\s*(,|OFFSET)\s*\d+)?/i', $query)) { return $query; } + $query = rtrim($query); + if (substr($query, -1) == ';') { + $query = substr($query, 0, -1); + } if (DB::isManip($query)) { return $query . " LIMIT $count"; } else { http://cvs.php.net/diff.php/pear/DB/DB/mysqli.php?r1=1.67&r2=1.68&ty=u Index: pear/DB/DB/mysqli.php diff -u pear/DB/DB/mysqli.php:1.67 pear/DB/DB/mysqli.php:1.68 --- pear/DB/DB/mysqli.php:1.67 Tue Mar 1 15:22:04 2005 +++ pear/DB/DB/mysqli.php Wed Mar 2 09:42:58 2005 @@ -19,7 +19,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mysqli.php,v 1.67 2005/03/01 20:22:04 danielc Exp $ + * @version CVS: $Id: mysqli.php,v 1.68 2005/03/02 14:42:58 danielc Exp $ * @link http://pear.php.net/package/DB */ @@ -881,6 +881,10 @@ if (preg_match('/LIMIT\s*\d(\s*(,|OFFSET)\s*\d+)?/i', $query)) { return $query; } + $query = rtrim($query); + if (substr($query, -1) == ';') { + $query = substr($query, 0, -1); + } if (DB::isManip($query)) { return $query . " LIMIT $count"; } else { http://cvs.php.net/diff.php/pear/DB/DB/pgsql.php?r1=1.124&r2=1.125&ty=u Index: pear/DB/DB/pgsql.php diff -u pear/DB/DB/pgsql.php:1.124 pear/DB/DB/pgsql.php:1.125 --- pear/DB/DB/pgsql.php:1.124 Tue Mar 1 15:22:04 2005 +++ pear/DB/DB/pgsql.php Wed Mar 2 09:42:58 2005 @@ -21,7 +21,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: pgsql.php,v 1.124 2005/03/01 20:22:04 danielc Exp $ + * @version CVS: $Id: pgsql.php,v 1.125 2005/03/02 14:42:58 danielc Exp $ * @link http://pear.php.net/package/DB */ @@ -761,6 +761,10 @@ if (preg_match('/LIMIT\s*\d(\s*(,|OFFSET)\s*\d+)?/i', $query)) { return $query; } + $query = rtrim($query); + if (substr($query, -1) == ';') { + $query = substr($query, 0, -1); + } return "$query LIMIT $count OFFSET $from"; } http://cvs.php.net/diff.php/pear/DB/DB/sqlite.php?r1=1.106&r2=1.107&ty=u Index: pear/DB/DB/sqlite.php diff -u pear/DB/DB/sqlite.php:1.106 pear/DB/DB/sqlite.php:1.107 --- pear/DB/DB/sqlite.php:1.106 Tue Mar 1 15:22:04 2005 +++ pear/DB/DB/sqlite.php Wed Mar 2 09:42:58 2005 @@ -21,7 +21,7 @@ * @author Daniel Convissor <danielc@php.net> * @copyright 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 3.0 - * @version CVS: $Id: sqlite.php,v 1.106 2005/03/01 20:22:04 danielc Exp $ + * @version CVS: $Id: sqlite.php,v 1.107 2005/03/02 14:42:58 danielc Exp $ * @link http://pear.php.net/package/DB */ @@ -642,6 +642,10 @@ if (preg_match('/LIMIT\s*\d(\s*(,|OFFSET)\s*\d+)?/i', $query)) { return $query; } + $query = rtrim($query); + if (substr($query, -1) == ';') { + $query = substr($query, 0, -1); + } return "$query LIMIT $count OFFSET $from"; }

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