From 67f0af33e16c2e41c7197bfde78d67e091ee3ba6 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 3 Mar 2015 15:33:34 +0000 Subject: [PATCH] Update PEAR to release 1.9.5, PEAR DB to release 1.8.2 git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@9588 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/pear/DB.php | 39 +- lib/pear/DB/Pager.php | 253 ----------- lib/pear/DB/common.php | 11 +- lib/pear/DB/dbase.php | 6 +- lib/pear/DB/fbsql.php | 6 +- lib/pear/DB/ibase.php | 6 +- lib/pear/DB/ifx.php | 6 +- lib/pear/DB/ldap.php | 912 ---------------------------------------- lib/pear/DB/msql.php | 6 +- lib/pear/DB/mssql.php | 6 +- lib/pear/DB/mysql.php | 17 +- lib/pear/DB/mysqli.php | 6 +- lib/pear/DB/oci8.php | 6 +- lib/pear/DB/odbc.php | 18 +- lib/pear/DB/pgsql.php | 18 +- lib/pear/DB/sqlite.php | 6 +- lib/pear/DB/storage.php | 6 +- lib/pear/DB/sybase.php | 6 +- lib/pear/PEAR.php | 8 +- 19 files changed, 71 insertions(+), 1271 deletions(-) delete mode 100644 lib/pear/DB/Pager.php delete mode 100644 lib/pear/DB/ldap.php diff --git a/lib/pear/DB.php b/lib/pear/DB.php index 4ae0d85ee..b9b5c4a79 100644 --- a/lib/pear/DB.php +++ b/lib/pear/DB.php @@ -5,7 +5,7 @@ /** * Database independent query interface * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: DB.php 315557 2011-08-26 14:32:35Z danielc $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -426,12 +426,12 @@ define('DB_PORTABILITY_ALL', 63); * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB { - // {{{ &factory() + // {{{ factory() /** * Create a new DB object for the specified database type but don't @@ -444,7 +444,7 @@ class DB * * @see DB_common::setOption() */ - function &factory($type, $options = false) + public static function factory($type, $options = false) { if (!is_array($options)) { $options = array('persistent' => $options); @@ -480,7 +480,7 @@ class DB } // }}} - // {{{ &connect() + // {{{ connect() /** * Create a new DB object including a connection to the specified database @@ -495,7 +495,7 @@ class DB * 'portability' => DB_PORTABILITY_ALL, * ); * - * $db =& DB::connect($dsn, $options); + * $db = DB::connect($dsn, $options); * if (PEAR::isError($db)) { * die($db->getMessage()); * } @@ -515,7 +515,7 @@ class DB * * @uses DB::parseDSN(), DB_common::setOption(), PEAR::isError() */ - static function &connect($dsn, $options = array()) + public static function connect($dsn, $options = array()) { $dsninfo = DB::parseDSN($dsn); $type = $dsninfo['phptype']; @@ -539,7 +539,8 @@ class DB if (!class_exists($classname)) { $tmp = PEAR::raiseError(null, DB_ERROR_NOT_FOUND, null, null, "Unable to include the DB/{$type}.php" - . " file for '$dsn'", + . " file for '" + . DB::getDSNString($dsn, true) . "'", 'DB_Error', true); return $tmp; } @@ -576,7 +577,7 @@ class DB */ function apiVersion() { - return '1.7.14'; + return '1.8.2'; } // }}} @@ -589,7 +590,7 @@ class DB * * @return bool whether $value is DB_Error object */ - static function isError($value) + public static function isError($value) { return is_object($value) && is_a($value, 'DB_Error'); } @@ -604,7 +605,7 @@ class DB * * @return bool whether $value is a DB_ object */ - function isConnection($value) + public static function isConnection($value) { return (is_object($value) && is_subclass_of($value, 'db_common') && @@ -625,7 +626,7 @@ class DB * * @return boolean whether $query is a data manipulation query */ - static function isManip($query) + public static function isManip($query) { $manips = 'INSERT|UPDATE|DELETE|REPLACE|' . 'CREATE|DROP|' @@ -649,7 +650,7 @@ class DB * @return string the error message or false if the error code was * not recognized */ - function errorMessage($value) + public static function errorMessage($value) { static $errorMessages; if (!isset($errorMessages)) { @@ -730,7 +731,7 @@ class DB * + username: User name for login * + password: Password for login */ - static function parseDSN($dsn) + public static function parseDSN($dsn) { $parsed = array( 'phptype' => false, @@ -859,7 +860,7 @@ class DB * @param boolean true to hide the password, false to include it * @return string */ - function getDSNString($dsn, $hidePassword) { + public static function getDSNString($dsn, $hidePassword) { /* Calling parseDSN will ensure that we have all the array elements * defined, and means that we deal with strings and array in the same * manner. */ @@ -940,7 +941,7 @@ class DB * @author Stig Bakken * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_Error extends PEAR_Error @@ -987,7 +988,7 @@ class DB_Error extends PEAR_Error * @author Stig Bakken * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_result @@ -1452,7 +1453,7 @@ class DB_result * @author Stig Bakken * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB * @see DB_common::setFetchMode() */ diff --git a/lib/pear/DB/Pager.php b/lib/pear/DB/Pager.php deleted file mode 100644 index 5650bcdfe..000000000 --- a/lib/pear/DB/Pager.php +++ /dev/null @@ -1,253 +0,0 @@ - -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// -// -/// -// Based on DB_Pager 0.7 from the pear.php.net repository. -// The only modifications made have been modification of the include paths. -// -// From Pear CVS: Id: Pager.php,v 1.3 2002/05/12 13:59:40 cox Exp - -require_once 'PEAR.php'; -require_once 'DB.php'; - -/** -* This class handles all the stuff needed for displaying paginated results -* from a database query of Pear DB, in a very easy way. -* Documentation and examples of use, can be found in: -* http://vulcanonet.com/soft/pager/ (could be outdated) -* -* IMPORTANT! -* Since PEAR DB already support native row limit (more fast and avaible in -* all the drivers), there is no more need to use $pager->build() or -* the $pager->fetch*() methods. -* -* Usage example: -* -*< ?php -* require_once 'DB/Pager.php'; -* $db = DB::connect('your DSN string'); -* $from = 0; // The row to start to fetch from (you might want to get this -* // param from the $_GET array -* $limit = 10; // The number of results per page -* $maxpages = 10; // The number of pages for displaying in the pager (optional) -* $res = $db->limitQuery($sql, $from, $limit); -* $nrows = 0; // Alternative you could use $res->numRows() -* while ($row = $res->fetchrow()) { -* // XXX code for building the page here -* $nrows++; -* } -* $data = DB_Pager::getData($from, $limit, $nrows, $maxpages); -* // XXX code for building the pager here -* ? > -* -* @version 0.7 -* @author Tomas V.V.Cox -* @see http://vulcanonet.com/soft/pager/ -*/ - -class DB_Pager extends PEAR -{ - - /** - * Constructor - * - * @param object $res A DB_result object from Pear_DB - * @param int $from The row to start fetching - * @param int $limit How many results per page - * @param int $numrows Pager will automatically - * find this param if is not given. If your Pear_DB backend extension - * doesn't support numrows(), you can manually calculate it - * and supply later to the constructor - * @deprecated - */ - function DB_Pager (&$res, $from, $limit, $numrows = null) - { - $this->res = $res; - $this->from = $from; - $this->limit = $limit; - $this->numrows = $numrows; - } - - /** - * Calculates all the data needed by Pager to work - * - * @return mixed An assoc array with all the data (see getData) - * or DB_Error on error - * @see DB_Pager::getData - * @deprecated - */ - function build() - { - // if there is no numrows given, calculate it - if ($this->numrows === null) { - $this->numrows = $this->res->numrows(); - if (DB::isError($this->numrows)) { - return $this->numrows; - } - } - $data = $this->getData($this->from, $this->limit, $this->numrows); - if (DB::isError($data)) { - return $data; - } - $this->current = $this->from - 1; - $this->top = $data['to']; - return $data; - } - - /** - * @deprecated - */ - function fetchRow($mode=DB_FETCHMODE_DEFAULT) - { - $this->current++; - if ($this->current >= $this->top) { - return null; - } - return $this->res->fetchRow($mode, $this->current); - } - - /** - * @deprecated - */ - function fetchInto(&$arr, $mode=DB_FETCHMODE_DEFAULT) - { - $this->current++; - if ($this->current >= $this->top) { - return null; - } - return $this->res->fetchInto($arr, $mode, $this->current); - } - - /* - * Gets all the data needed to paginate results - * This is an associative array with the following - * values filled in: - * - * array( - * 'current' => X, // current page you are - * 'numrows' => X, // total number of results - * 'next' => X, // row number where next page starts - * 'prev' => X, // row number where prev page starts - * 'remain' => X, // number of results remaning *in next page* - * 'numpages'=> X, // total number of pages - * 'from' => X, // the row to start fetching - * 'to' => X, // the row to stop fetching - * 'limit' => X, // how many results per page - * 'maxpages' => X, // how many pages to show (google style) - * 'firstpage' => X, // the row number of the first page - * 'lastpage' => X, // the row number where the last page starts - * 'pages' => array( // assoc with page "number => start row" - * 1 => X, - * 2 => X, - * 3 => X - * ) - * ); - * @param int $from The row to start fetching - * @param int $limit How many results per page - * @param int $numrows Number of results from query - * - * @return array associative array with data or DB_error on error - * - */ - function &getData($from, $limit, $numrows, $maxpages = false) - { - if (empty($numrows) || ($numrows < 0)) { - return null; - } - $from = (empty($from)) ? 0 : $from; - - if ($limit <= 0) { - return PEAR::raiseError (null, 'wrong "limit" param', null, - null, null, 'DB_Error', true); - } - - // Total number of pages - $pages = ceil($numrows/$limit); - $data['numpages'] = $pages; - - // first & last page - $data['firstpage'] = 1; - $data['lastpage'] = $pages; - - // Build pages array - $data['pages'] = array(); - for ($i=1; $i <= $pages; $i++) { - $offset = $limit * ($i-1); - $data['pages'][$i] = $offset; - // $from must point to one page - if ($from == $offset) { - // The current page we are - $data['current'] = $i; - } - } - if (!isset($data['current'])) { - return PEAR::raiseError (null, 'wrong "from" param', null, - null, null, 'DB_Error', true); - } - - // Limit number of pages (goole algoritm) - if ($maxpages) { - $radio = floor($maxpages/2); - $minpage = $data['current'] - $radio; - if ($minpage < 1) { - $minpage = 1; - } - $maxpage = $data['current'] + $radio - 1; - if ($maxpage > $data['numpages']) { - $maxpage = $data['numpages']; - } - foreach (range($minpage, $maxpage) as $page) { - $tmp[$page] = $data['pages'][$page]; - } - $data['pages'] = $tmp; - $data['maxpages'] = $maxpages; - } else { - $data['maxpages'] = null; - } - - // Prev link - $prev = $from - $limit; - $data['prev'] = ($prev >= 0) ? $prev : null; - - // Next link - $next = $from + $limit; - $data['next'] = ($next < $numrows) ? $next : null; - - // Results remaining in next page & Last row to fetch - if ($data['current'] == $pages) { - $data['remain'] = 0; - $data['to'] = $numrows; - } else { - if ($data['current'] == ($pages - 1)) { - $data['remain'] = $numrows - ($limit*($pages-1)); - } else { - $data['remain'] = $limit; - } - $data['to'] = $data['current'] * $limit; - } - $data['numrows'] = $numrows; - $data['from'] = $from + 1; - $data['limit'] = $limit; - - return $data; - } -} diff --git a/lib/pear/DB/common.php b/lib/pear/DB/common.php index 2808221ef..27829a072 100644 --- a/lib/pear/DB/common.php +++ b/lib/pear/DB/common.php @@ -5,7 +5,7 @@ /** * Contains the DB_common base class * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: common.php 315557 2011-08-26 14:32:35Z danielc $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -42,7 +42,7 @@ require_once 'PEAR.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_common extends PEAR @@ -261,7 +261,7 @@ class DB_common extends PEAR */ function quoteString($string) { - $string = $this->quote($string); + $string = $this->quoteSmart($string); if ($string{0} == "'") { return substr($string, 1, -1); } @@ -284,8 +284,7 @@ class DB_common extends PEAR */ function quote($string = null) { - return ($string === null) ? 'NULL' - : "'" . str_replace("'", "''", $string) . "'"; + return $this->quoteSmart($string); } // }}} diff --git a/lib/pear/DB/dbase.php b/lib/pear/DB/dbase.php index c1e454cc8..df36f972e 100644 --- a/lib/pear/DB/dbase.php +++ b/lib/pear/DB/dbase.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's dbase extension * for interacting with dBase databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: dbase.php 242771 2007-09-21 13:40:42Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -41,7 +41,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_dbase extends DB_common diff --git a/lib/pear/DB/fbsql.php b/lib/pear/DB/fbsql.php index 07bf1b4cc..b719da38e 100644 --- a/lib/pear/DB/fbsql.php +++ b/lib/pear/DB/fbsql.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's fbsql extension * for interacting with FrontBase databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: fbsql.php 239211 2007-07-06 05:19:21Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -41,7 +41,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB * @since Class functional since Release 1.7.0 */ diff --git a/lib/pear/DB/ibase.php b/lib/pear/DB/ibase.php index 5a107c601..209ac6c3a 100644 --- a/lib/pear/DB/ibase.php +++ b/lib/pear/DB/ibase.php @@ -9,7 +9,7 @@ * While this class works with PHP 4, PHP's InterBase extension is * unstable in PHP 4. Use PHP 5. * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -23,7 +23,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ibase.php 277804 2009-03-26 07:16:31Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -49,7 +49,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB * @since Class became stable in Release 1.7.0 */ diff --git a/lib/pear/DB/ifx.php b/lib/pear/DB/ifx.php index cfefc3366..e3150f92f 100644 --- a/lib/pear/DB/ifx.php +++ b/lib/pear/DB/ifx.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's ifx extension * for interacting with Informix databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: ifx.php 302738 2010-08-24 03:06:52Z clockwerx $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -48,7 +48,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_ifx extends DB_common diff --git a/lib/pear/DB/ldap.php b/lib/pear/DB/ldap.php deleted file mode 100644 index 7b7da210a..000000000 --- a/lib/pear/DB/ldap.php +++ /dev/null @@ -1,912 +0,0 @@ - -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// -// Contributors -// - Piotr Roszatycki -// DB_ldap::base() method, support for LDAP sequences, various fixes -// -// Based on DB 1.3 from the pear.php.net repository. -// The only modifications made have been modification of the include paths. -// -// From Pear CVS: Id: ldap.php,v 1.9 2002/02/11 12:59:37 mj Exp - -require_once 'DB/common.php'; -define("DB_ERROR_BIND_FAILED", -26); -define("DB_ERROR_UNKNOWN_LDAP_ACTION", -27); - -/** - * LDAP result class - * - * LDAP_result extends DB_result to provide specific LDAP - * result methods. - * - * @version 1.0 - * @author Ludovico Magnocavallo - * @package DB - */ - -class LDAP_result extends DB_result -{ - - // {{{ properties - - /** - * data returned from ldap_entries() - * @access private - */ - var $_entries = null; - /** - * result rows as hash of records - * @access private - */ - var $_recordset = null; - /** - * current record as hash - * @access private - */ - var $_record = null; - - // }}} - // {{{ constructor - - /** - * class constructor, calls DB_result constructor - * @param ref $dbh reference to the db instance - * @param resource $result ldap command result - */ - function LDAP_result(&$dbh, $result) - { - $this->DB_result($dbh, $result); - } - - /** - * fetch rows of data into $this->_recordset - * - * called once as soon as something needs to be returned - * @access private - * @param resource $result ldap command result - * @return boolean true - */ - function getRows() { - if ($this->_recordset === null) { - // begin processing result into recordset - $this->_entries = ldap_get_entries($this->dbh->connection, $this->result); - $this->row_counter = $this->_entries['count']; - $i = 1; - $rs_template = array(); - if (count($this->dbh->attributes) > 0) { - reset($this->dbh->attributes); - while (list($a_index, $a_name) = each($this->dbh->attributes)) $rs_template[$a_name] = ''; - } - while (list($entry_idx, $entry) = each($this->_entries)) { - // begin first loop, iterate through entries - if (!empty($this->dbh->limit_from) && ($i < $this->dbh->limit_from)) continue; - if (!empty($this->dbh->limit_count) && ($i > $this->dbh->limit_count)) break; - $rs = $rs_template; - if (!is_array($entry)) continue; - while (list($attr, $attr_values) = each($entry)) { - // begin second loop, iterate through attributes - if (is_int($attr) || $attr == 'count') continue; - if (is_string($attr_values)) $rs[$attr] = $attr_values; - else { - $value = ''; - while (list($value_idx, $attr_value) = each($attr_values)) { - // begin third loop, iterate through attribute values - if (!is_int($value_idx)) continue; - if (empty($value)) $value = $attr_value; - else { - if (is_array($value)) $value[] = $attr_value; - else $value = array($value, $attr_value); - } -// else $value .= "\n$attr_value"; - // end third loop - } - $rs[$attr] = $value; - } - // end second loop - } - reset($rs); - $this->_recordset[$entry_idx] = $rs; - $i++; - // end first loop - } - $this->_entries = null; - if (!is_array($this->_recordset)) - $this->_recordset = array(); - if (!empty($this->dbh->sorting)) { - $sorting_method = (!empty($this->dbh->sorting_method) ? $this->dbh->sorting_method : 'cmp'); - uksort($this->_recordset, array(&$this, $sorting_method)); - } - reset($this->_recordset); - // end processing result into recordset - } - return DB_OK; - } - - - /** - * Fetch and return a row of data (it uses driver->fetchInto for that) - * @param int $fetchmode format of fetched row - * @param int $rownum the row number to fetch - * - * @return array a row of data, NULL on no more rows or PEAR_Error on error - * - * @access public - */ - function &fetchRow($fetchmode = DB_FETCHMODE_DEFAULT, $rownum=null) - { - $this->getRows(); - if (count($this->_recordset) == 0) return null; - if ($this->_record !== null) $this->_record = next($this->_recordset); - else $this->_record = current($this->_recordset); - $row = $this->_record; - return $row; - } - - - /** - * Fetch a row of data into an existing variable. - * - * @param mixed $arr reference to data containing the row - * @param integer $fetchmode format of fetched row - * @param integer $rownum the row number to fetch - * - * @return mixed DB_OK on success, NULL on no more rows or - * a DB_Error object on error - * - * @access public - */ - - function fetchInto(&$ar, $fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null) - { - $this->getRows(); - if ($this->_record !== null) $this->_record = next($this->_recordset); - else $this->_record = current($this->_recordset); - $ar = $this->_record; - if (!$ar) { - return null; - } - return DB_OK; - } - - /** - * return all records - * - * returns a hash of all records, basically returning - * a copy of $this->_recordset - * @param integer $fetchmode format of fetched row - * @param integer $rownum the row number to fetch (not used, here for interface compatibility) - * - * @return mixed DB_OK on success, NULL on no more rows or - * a DB_Error object on error - * - * @access public - */ - function fetchAll($fetchmode = DB_FETCHMODE_DEFAULT, $rownum = null) - { - $this->getRows(); - return($this->_recordset); - } - - /** - * Get the the number of columns in a result set. - * - * @return int the number of columns, or a DB error - * - * @access public - */ - function numCols($result) - { - $this->getRows(); - return(count(array_keys($this->_record))); - } - - function cmp($a, $b) - { - return(strcmp(strtolower($this->_recordset[$a][$this->dbh->sorting]), strtolower($this->_recordset[$b][$this->dbh->sorting]))); - } - - /** - * Get the number of rows in a result set. - * - * @return int the number of rows, or a DB error - * - * @access public - */ - function numRows() - { - $this->getRows(); - return $this->row_counter; - } - - /** - * Get the next result if a batch of queries was executed. - * - * @return bool true if a new result is available or false if not. - * - * @access public - */ - function nextResult() - { - return $this->dbh->nextResult($this->result); - } - - /** - * Frees the resources allocated for this result set. - * @return int error code - * - * @access public - */ - function free() - { - $this->_recordset = null; - $this->_record = null; - ldap_free_result($this->result); - $this->result = null; - return true; - } - - /** - * @deprecated - */ - function tableInfo($mode = null) - { - return $this->dbh->tableInfo($this->result, $mode); - } - - /** - * returns the actual rows number - * @return integer - */ - function getRowCounter() - { - $this->getRows(); - return $this->row_counter; - } -} - -/** - * LDAP DB interface class - * - * LDAP extends DB_common to provide DB compliant - * access to LDAP servers - * - * @version 1.0 - * @author Ludovico Magnocavallo - * @package DB - */ - -class DB_ldap extends DB_common -{ - // {{{ properties - - /** - * LDAP connection - * @access private - */ - var $connection; - /** - * base dn - * @access private - */ - var $base = ''; - /** - * query base dn - * @access private - */ - var $q_base = ''; - /** - * array of LDAP actions that only manipulate data - * returning a true/false value - * @access private - */ - var $manip = array('add', 'compare', 'delete', 'modify', 'mod_add', 'mod_del', 'mod_replace', 'rename'); - /** - * store the real LDAP action to perform - * (ie PHP ldap function to call) for a query - * @access private - */ - var $q_action = ''; - /** - * store optional parameters passed - * to the real LDAP action - * @access private - */ - var $q_params = array(); - - // }}} - - /** - * Constructor, calls DB_common constructor - * - * @see DB_common::DB_common() - */ - function DB_ldap() - { - $this->DB_common(); - $this->phptype = 'ldap'; - $this->dbsyntax = 'ldap'; - $this->features = array( - 'prepare' => false, - 'pconnect' => false, - 'transactions' => false, - 'limit' => false - ); - } - - /** - * Connect and bind to LDAP server with either anonymous or authenticated bind depending on dsn info - * - * @param array $dsninfo dsn info as passed by DB::connect() - * @param boolean $persistent kept for interface compatibility - * @return DB_OK if successfully connected. A DB error code is returned on failure. - */ - function connect($dsninfo, $persistent = false) - { - if (!DB::assertExtension('ldap')) - return $this->raiseError(DB_ERROR_EXTENSION_NOT_FOUND); - - $this->dsn = $dsninfo; - $user = $dsninfo['username']; - $pw = $dsninfo['password']; - $host = $dsninfo['hostspec']; - $this->base = $dsninfo['database']; - - if ($host) { - $conn = ldap_connect($host); - } else { - return $this->raiseError("unknown host $host"); - } - if (!$conn) { - return $this->raiseError(DB_ERROR_CONNECT_FAILED); - } - if ($user && $pw) { - $bind = ldap_bind($conn, "${user}," . $this->base, $pw); - } else { - $bind = ldap_bind($conn); - } - if (!$bind) { - return $this->raiseError(DB_ERROR_BIND_FAILED); - } - $this->connection = $conn; - return DB_OK; - } - - /** - * Unbinds from LDAP server - * - * @return int ldap_unbind() return value - */ - function disconnect() - { - $ret = @ldap_unbind($this->connection); - $this->connection = null; - return $ret; - } - - - /** - * Performs a request against the LDAP server - * - * The type of request (and the corresponding PHP ldap function called) - * depend on two additional parameters, added in respect to the - * DB_common interface. - * - * @param string $filter text of the request to send to the LDAP server - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @return result from ldap function or DB Error object if no result - */ - function simpleQuery($filter, $action = null, $params = null) - { - if ($action === null) { - $action = (!empty($this->q_action) ? $this->q_action : 'search'); - } - if ($params === null) { - $params = (count($this->q_params) > 0 ? $this->q_params : array()); - } - if (!$this->isManip($action)) { - $base = $this->q_base ? $this->q_base : $this->base; - $attributes = array(); - $attrsonly = 0; - $sizelimit = 0; - $timelimit = 0; - $deref = LDAP_DEREF_NEVER; - $sorting = ''; - $sorting_method = ''; - reset($params); - while (list($k, $v) = each($params)) { - if (isset(${$k})) ${$k} = $v; - } - $this->sorting = $sorting; - $this->sorting_method = $sorting_method; - $this->attributes = $attributes; - if ($action == 'search') - $result = @ldap_search($this->connection, $base, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); - else if ($action == 'list') - $result = @ldap_list($this->connection, $base, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); - else if ($action == 'read') - $result = @ldap_read($this->connection, $base, $filter, $attributes, $attrsonly, $sizelimit, $timelimit, $deref); - else - return $this->raiseError(DB_ERROR_UNKNOWN_LDAP_ACTION); - if (!$result) { - return $this->raiseError(); - } - } else { - # If first argument is an array, it contains the entry with DN. - if (is_array($filter)) { - $entry = $filter; - $filter = $entry["dn"]; - } else { - $entry = array(); - } - unset($entry["dn"]); - $attribute = ''; - $value = ''; - $newrdn = ''; - $newparent = ''; - $deleteoldrdn = false; - reset($params); - while (list($k, $v) = each($params)) { - if (isset(${$k})) ${$k} = $v; - } - if ($action == 'add') - $result = @ldap_add($this->connection, $filter, $entry); - else if ($action == 'compare') - $result = @ldap_add($this->connection, $filter, $attribute, $value); - else if ($action == 'delete') - $result = @ldap_delete($this->connection, $filter); - else if ($action == 'modify') - $result = @ldap_modify($this->connection, $filter, $entry); - else if ($action == 'mod_add') - $result = @ldap_mod_add($this->connection, $filter, $entry); - else if ($action == 'mod_del') - $result = @ldap_mod_del($this->connection, $filter, $entry); - else if ($action == 'mod_replace') - $result = @ldap_mod_replace($this->connection, $filter, $entry); - else if ($action == 'rename') - $result = @ldap_rename($this->connection, $filter, $newrdn, $newparent, $deleteoldrdn); - else - return $this->raiseError(DB_ERROR_UNKNOWN_LDAP_ACTION); - if (!$result) { - return $this->raiseError(); - } - } - $this->freeQuery(); - return $result; - } - - /** - * Executes a query performing variables substitution in the query text - * - * @param string $stmt text of the request to send to the LDAP server - * @param array $data query variables values to substitute - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @return LDAP_result object or DB Error object if no result - * @see DB_common::executeEmulateQuery $this->simpleQuery() - */ - function execute($stmt, $data = false, $action = 'search', $params = array()) - { - $this->q_action = $action; - $this->q_params = $params; - $realquery = $this->executeEmulateQuery($stmt, $data); - if (DB::isError($realquery)) { - return $realquery; - } - $result = $this->simpleQuery($realquery); - if (DB::isError($result) || $result === DB_OK) { - return $result; - } else { - return new LDAP_result($this, $result); - } - } - - /** - * Executes multiple queries performing variables substitution for each query - * - * @param string $stmt text of the request to send to the LDAP server - * @param array $data query variables values to substitute - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @return LDAP_result object or DB Error object if no result - * @see DB_common::executeMultiple - */ - function executeMultiple($stmt, &$data, $action = 'search', $params = array()) - { - $this->q_action = $action; - $this->q_params = $params; - return(parent::executeMultiple($stmt, $data)); - } - - /** - * Executes a query substituting variables if any are present - * - * @param string $query text of the request to send to the LDAP server - * @param array $data query variables values to substitute - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @return LDAP_result object or DB Error object if no result - * @see DB_common::prepare() $this->execute()$this->simpleQuery() - */ - function &query($query, $data = array(), $action = 'search', $params = array()) { - $this->q_action = $action; - $this->q_params = $params; - if (sizeof($data) > 0) { - $sth = $this->prepare($query); - if (DB::isError($sth)) { - return $sth; - } - return $this->execute($sth, $data); - } else { - $result = $this->simpleQuery($query); - if (DB::isError($result) || $result === DB_OK) { - return $result; - } else { - return new LDAP_result($this, $result); - } - } - } - - /** - * Modifies a query to return only a set of rows, stores $from and $count for LDAP_result - * - * @param string $query text of the request to send to the LDAP server - * @param int $from record position from which to start returning data - * @param int $count number of records to return - * @return modified query text (no modifications are made, see above) - */ - function modifyLimitQuery($query, $from, $count) - { - $this->limit_from = $from; - $this->limit_count = $count; - return $query; - } - - /** - * Executes a query returning only a specified number of rows - * - * This method only saves the $from and $count parameters for LDAP_result - * where the actual records processing takes place - * - * @param string $query text of the request to send to the LDAP server - * @param int $from record position from which to start returning data - * @param int $count number of records to return - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @return LDAP_result object or DB Error object if no result - */ - function limitQuery($query, $from, $count, $action = 'search', $params = array()) - { - $query = $this->modifyLimitQuery($query, $from, $count); - $this->q_action = $action; - $this->q_params = $params; - return $this->query($query, $action, $params); - } - - /** - * Fetch the first column of the first row of data returned from - * a query. Takes care of doing the query and freeing the results - * when finished. - * - * @param $query the SQL query - * @param $data if supplied, prepare/execute will be used - * with this array as execute parameters - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @return array - * @see DB_common::getOne() - * @access public - */ - function &getOne($query, $data = array(), $action = 'search', $params = array()) - { - $this->q_action = $action; - $this->q_params = $params; - return(parent::getOne($query, $data)); - } - - /** - * Fetch the first row of data returned from a query. Takes care - * of doing the query and freeing the results when finished. - * - * @param $query the SQL query - * @param $fetchmode the fetch mode to use - * @param $data array if supplied, prepare/execute will be used - * with this array as execute parameters - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @access public - * @return array the first row of results as an array indexed from - * 0, or a DB error code. - * @see DB_common::getRow() - * @access public - */ - function &getRow($query, - $data = null, - $fetchmode = DB_FETCHMODE_DEFAULT, - $action = 'search', $params = array()) - { - $this->q_action = $action; - $this->q_params = $params; - return(parent::getRow($query, $data, $fetchmode)); - } - - /** - * Fetch the first column of data returned from a query. Takes care - * of doing the query and freeing the results when finished. - * - * @param $query the SQL query - * @param $col which column to return (integer [column number, - * starting at 0] or string [column name]) - * @param $data array if supplied, prepare/execute will be used - * with this array as execute parameters - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @access public - * @return array an indexed array with the data from the first - * row at index 0, or a DB error code. - * @see DB_common::getCol() - * @access public - */ - function &getCol($query, $col = 0, $data = array(), $action = 'search', $params = array()) - { - $this->q_action = $action; - $this->q_params = $params; - return(parent::getCol($query, $col, $data)); - } - - /** - * Calls DB_common::getAssoc() - * - * @param $query the SQL query - * @param $force_array (optional) used only when the query returns - * exactly two columns. If true, the values of the returned array - * will be one-element arrays instead of scalars. - * starting at 0] or string [column name]) - * @param array $data if supplied, prepare/execute will be used - * with this array as execute parameters - * @param $fetchmode the fetch mode to use - * @param boolean $group see DB_Common::getAssoc() - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @access public - * @return array an indexed array with the data from the first - * row at index 0, or a DB error code. - * @see DB_common::getAssoc() - * @access public - */ - function &getAssoc($query, $force_array = false, $data = array(), - $fetchmode = DB_FETCHMODE_ORDERED, $group = false, - $action = 'search', $params = array()) - { - $this->q_action = $action; - $this->q_params = $params; - return(parent::getAssoc($query, $force_array, $data, $fetchmode, $group)); - } - - /** - * Fetch all the rows returned from a query. - * - * @param $query the SQL query - * @param array $data if supplied, prepare/execute will be used - * with this array as execute parameters - * @param $fetchmode the fetch mode to use - * @param string $action type of request to perform, defaults to search (ldap_search()) - * @param array $params array of additional parameters to pass to the PHP ldap function requested - * @access public - * @return array an nested array, or a DB error - * @see DB_common::getAll() - */ - function &getAll($query, - $data = null, - $fetchmode = DB_FETCHMODE_DEFAULT, - $action = 'search', $params = array()) - { - $this->q_action = $action; - $this->q_params = $params; - return(parent::getAll($query, $data, $fetchmode)); - } - - function numRows($result) - { - return $result->numRows(); - } - - function getTables() - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - function getListOf($type) - { - return $this->raiseError(DB_ERROR_NOT_CAPABLE); - } - - function isManip($action) - { - return(in_array($action, $this->manip)); - } - - function freeResult() - { - return true; - } - - function freeQuery($query = '') - { - $this->q_action = ''; - $this->q_base = ''; - $this->q_params = array(); - $this->attributes = null; - $this->sorting = ''; - return true; - } - - function base($base = null) - { - $this->q_base = ($base !== null) ? $base : null; - return true; - } - - /** - * Get the next value in a sequence. - * - * LDAP provides transactions for only one entry and we need to - * prevent race condition. If unique value before and after modify - * aren't equal then wait and try again. - * - * The name of sequence is LDAP DN of entry. - * - * @access public - * @param string $seq_name the DN of the sequence - * @param bool $ondemand whether to create the sequence on demand - * @return a sequence integer, or a DB error - */ - function nextId($seq_name, $ondemand = true) - { - $repeat = 0; - do { - // Get the sequence entry - $this->base($seq_name); - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $data = $this->getRow("objectClass=*"); - $this->popErrorHandling(); - - if (DB::isError($data)) { - // DB_ldap doesn't use DB_ERROR_NOT_FOUND - if ($ondemand && $repeat == 0 - && $data->getCode() == DB_ERROR) { - // Try to create sequence and repeat - $repeat = 1; - $data = $this->createSequence($seq_name); - if (DB::isError($data)) { - return $this->raiseError($data); - } - } else { - // Other error - return $this->raiseError($data); - } - } else { - // Increment sequence value - $data["cn"]++; - // Unique identificator of transaction - $seq_unique = mt_rand(); - $data["uid"] = $seq_unique; - // Modify the LDAP entry - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $data = $this->simpleQuery($data, 'modify'); - $this->popErrorHandling(); - if (DB::isError($data)) { - return $this->raiseError($data); - } - // Get the entry and check if it contains our unique value - $this->base($seq_name); - $data = $this->getRow("objectClass=*"); - if (DB::isError($data)) { - return $this->raiseError($data); - } - if ($data["uid"] != $seq_unique) { - // It is not our entry. Wait a little time and repeat - sleep(1); - $repeat = 1; - } else { - $repeat = 0; - } - } - } while ($repeat); - - if (DB::isError($data)) { - return $data; - } - return $data["cn"]; - } - - /** - * Create the sequence - * - * The sequence entry is based on core schema with extensibleObject, - * so it should work with any LDAP server which doesn't check schema - * or supports extensibleObject object class. - * - * Sequence name have to be DN started with "sn=$seq_id,", i.e.: - * - * $seq_name = "sn=uidNumber,ou=sequences,dc=php,dc=net"; - * - * dn: $seq_name - * objectClass: top - * objectClass: extensibleObject - * sn: $seq_id - * cn: $seq_value - * uid: $seq_uniq - * - * @param string $seq_name the DN of the sequence - * @return mixed DB_OK on success or DB error on error - * @access public - */ - function createSequence($seq_name) - { - // Extract $seq_id from DN - ereg("^([^,]*),", $seq_name, $regs); - $seq_id = $regs[1]; - - // Create the sequence entry - $data = array( - dn => $seq_name, - objectclass => array("top", "extensibleObject"), - sn => $seq_id, - cn => 0, - uid => 0 - ); - - // Add the LDAP entry - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $data = $this->simpleQuery($data, 'add'); - $this->popErrorHandling(); - return $data; - } - - /** - * Drop a sequence - * - * @param string $seq_name the DN of the sequence - * @return mixed DB_OK on success or DB error on error - * @access public - */ - function dropSequence($seq_name) - { - // Delete the sequence entry - $data = array( - dn => $seq_name, - ); - $this->pushErrorHandling(PEAR_ERROR_RETURN); - $data = $this->simpleQuery($data, 'delete'); - $this->popErrorHandling(); - return $data; - } - -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ diff --git a/lib/pear/DB/msql.php b/lib/pear/DB/msql.php index 265591a59..c303bb906 100644 --- a/lib/pear/DB/msql.php +++ b/lib/pear/DB/msql.php @@ -10,7 +10,7 @@ * 4.3.11 and 5.0.4. Make sure your version of PHP meets or exceeds * those versions. * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -23,7 +23,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: msql.php 242771 2007-09-21 13:40:42Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -47,7 +47,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB * @since Class not functional until Release 1.7.0 */ diff --git a/lib/pear/DB/mssql.php b/lib/pear/DB/mssql.php index 52d50935f..e25caf144 100644 --- a/lib/pear/DB/mssql.php +++ b/lib/pear/DB/mssql.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's mssql extension * for interacting with Microsoft SQL Server databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mssql.php 306603 2010-12-24 06:05:07Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -49,7 +49,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_mssql extends DB_common diff --git a/lib/pear/DB/mysql.php b/lib/pear/DB/mysql.php index 2a57ef5b7..21132d62d 100644 --- a/lib/pear/DB/mysql.php +++ b/lib/pear/DB/mysql.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's mysql extension * for interacting with MySQL databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mysql.php 242769 2007-09-21 13:32:52Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -41,7 +41,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_mysql extends DB_common @@ -772,17 +772,6 @@ class DB_mysql extends DB_common return '`' . str_replace('`', '``', $str) . '`'; } - // }}} - // {{{ quote() - - /** - * @deprecated Deprecated in release 1.6.0 - */ - function quote($str) - { - return $this->quoteSmart($str); - } - // }}} // {{{ escapeSimple() diff --git a/lib/pear/DB/mysqli.php b/lib/pear/DB/mysqli.php index b48121377..5f081f7c4 100644 --- a/lib/pear/DB/mysqli.php +++ b/lib/pear/DB/mysqli.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's mysqli extension * for interacting with MySQL databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -19,7 +19,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: mysqli.php 315557 2011-08-26 14:32:35Z danielc $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -43,7 +43,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB * @since Class functional since Release 1.6.3 */ diff --git a/lib/pear/DB/oci8.php b/lib/pear/DB/oci8.php index 0c1e423ba..9685c60e0 100644 --- a/lib/pear/DB/oci8.php +++ b/lib/pear/DB/oci8.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's oci8 extension * for interacting with Oracle databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: oci8.php 293241 2010-01-08 05:00:28Z danielc $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -47,7 +47,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_oci8 extends DB_common diff --git a/lib/pear/DB/odbc.php b/lib/pear/DB/odbc.php index 6321fa4d3..75d4fe74f 100644 --- a/lib/pear/DB/odbc.php +++ b/lib/pear/DB/odbc.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's odbc extension * for interacting with databases via ODBC connections * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -20,7 +20,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: odbc.php 239211 2007-07-06 05:19:21Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -44,7 +44,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_odbc extends DB_common @@ -480,18 +480,6 @@ class DB_odbc extends DB_common } } - // }}} - // {{{ quote() - - /** - * @deprecated Deprecated in release 1.6.0 - * @internal - */ - function quote($str) - { - return $this->quoteSmart($str); - } - // }}} // {{{ nextId() diff --git a/lib/pear/DB/pgsql.php b/lib/pear/DB/pgsql.php index 372b76bf7..adfd6bf0a 100644 --- a/lib/pear/DB/pgsql.php +++ b/lib/pear/DB/pgsql.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's pgsql extension * for interacting with PostgreSQL databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -21,7 +21,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: pgsql.php 306604 2010-12-24 06:09:35Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -43,7 +43,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_pgsql extends DB_common @@ -465,18 +465,6 @@ class DB_pgsql extends DB_common return false; } - // }}} - // {{{ quote() - - /** - * @deprecated Deprecated in release 1.6.0 - * @internal - */ - function quote($str) - { - return $this->quoteSmart($str); - } - // }}} // {{{ quoteBoolean() diff --git a/lib/pear/DB/sqlite.php b/lib/pear/DB/sqlite.php index afda155ac..7adfb4c47 100644 --- a/lib/pear/DB/sqlite.php +++ b/lib/pear/DB/sqlite.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's sqlite extension * for interacting with SQLite databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -21,7 +21,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 3.0 - * @version CVS: $Id: sqlite.php 306605 2010-12-24 06:22:59Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -47,7 +47,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_sqlite extends DB_common diff --git a/lib/pear/DB/storage.php b/lib/pear/DB/storage.php index 5c85a53e5..9ac23c825 100644 --- a/lib/pear/DB/storage.php +++ b/lib/pear/DB/storage.php @@ -5,7 +5,7 @@ /** * Provides an object interface to a table row * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -18,7 +18,7 @@ * @author Stig Bakken * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: storage.php 241120 2007-08-12 05:27:25Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -38,7 +38,7 @@ require_once 'DB.php'; * @author Stig Bakken * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_storage extends PEAR diff --git a/lib/pear/DB/sybase.php b/lib/pear/DB/sybase.php index 4576c2880..ed1bcdcfb 100644 --- a/lib/pear/DB/sybase.php +++ b/lib/pear/DB/sybase.php @@ -6,7 +6,7 @@ * The PEAR DB driver for PHP's sybase extension * for interacting with Sybase databases * - * PHP versions 4 and 5 + * PHP version 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: @@ -21,7 +21,7 @@ * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: sybase.php 242771 2007-09-21 13:40:42Z aharvey $ + * @version CVS: $Id$ * @link http://pear.php.net/package/DB */ @@ -46,7 +46,7 @@ require_once 'DB/common.php'; * @author Daniel Convissor * @copyright 1997-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version Release: 1.7.14 + * @version Release: 1.8.2 * @link http://pear.php.net/package/DB */ class DB_sybase extends DB_common diff --git a/lib/pear/PEAR.php b/lib/pear/PEAR.php index 2aa85259d..e6f8edc2a 100644 --- a/lib/pear/PEAR.php +++ b/lib/pear/PEAR.php @@ -14,7 +14,7 @@ * @author Greg Beaver * @copyright 1997-2010 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: PEAR.php 313023 2011-07-06 19:17:11Z dufuz $ + * @version CVS: $Id$ * @link http://pear.php.net/package/PEAR * @since File available since Release 0.1 */ @@ -78,7 +78,7 @@ $GLOBALS['_PEAR_error_handler_stack'] = array(); * @author Greg Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.9.5 * @link http://pear.php.net/package/PEAR * @see PEAR_Error * @since Class available since PHP 4.0.2 @@ -689,7 +689,7 @@ class PEAR } /** - * OS independant PHP extension load. Remember to take care + * OS independent PHP extension load. Remember to take care * on the correct extension name for case sensitive OSes. * * @param string $ext The extension name @@ -788,7 +788,7 @@ function _PEAR_call_destructors() * @author Gregory Beaver * @copyright 1997-2006 The PHP Group * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version Release: 1.9.4 + * @version Release: 1.9.5 * @link http://pear.php.net/manual/en/core.pear.pear-error.php * @see PEAR::raiseError(), PEAR::throwError() * @since Class available since PHP 4.0.2 -- 2.45.0