cvs: pear /DB package.xml /DB/DB oci8.php

From: Date: Mon, 11 Apr 2005 15:10:24 +0000
Subject: cvs: pear /DB package.xml /DB/DB oci8.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-31102@lists.php.net to get a copy of this message
danielc Mon Apr 11 11:10:24 2005 EDT Modified files: /pear/DB package.xml /pear/DB/DB oci8.php Log: * Provide BC hack for those connecting to oci8 using 'hostspec' instead of 'database'. Bug 4104. http://cvs.php.net/diff.php/pear/DB/package.xml?r1=1.184&r2=1.185&ty=u Index: pear/DB/package.xml diff -u pear/DB/package.xml:1.184 pear/DB/package.xml:1.185 --- pear/DB/package.xml:1.184 Thu Apr 7 10:27:35 2005 +++ pear/DB/package.xml Mon Apr 11 11:10:18 2005 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="ISO-8859-1" ?> <package version="1.0"> - <!-- $Id: package.xml,v 1.184 2005/04/07 14:27:35 danielc Exp $ --> + <!-- $Id: package.xml,v 1.185 2005/04/11 15:10:18 danielc Exp $ --> <name>DB</name> <summary>Database Abstraction Layer</summary> <description> @@ -68,10 +68,13 @@ <release> <version>1.7.6</version> <state>stable</state> - <date>pending</date> + <date>2005-04-11</date> <notes><![CDATA[ common: * Fix the docblocks regarding DB_FETCHMODE_FLIPPED. Bug 4027. + +oic8: +* Provide BC hack for those connecting to oci8 using 'hostspec' instead of 'database'. Bug 4104. ]]></notes> <filelist> <file name="DB.php" role="php" baseinstalldir="/"> http://cvs.php.net/diff.php/pear/DB/DB/oci8.php?r1=1.102&r2=1.103&ty=u Index: pear/DB/DB/oci8.php diff -u pear/DB/DB/oci8.php:1.102 pear/DB/DB/oci8.php:1.103 --- pear/DB/DB/oci8.php:1.102 Sun Feb 27 20:42:01 2005 +++ pear/DB/DB/oci8.php Mon Apr 11 11:10:22 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: oci8.php,v 1.102 2005/02/28 01:42:01 danielc Exp $ + * @version CVS: $Id: oci8.php,v 1.103 2005/04/11 15:10:22 danielc Exp $ * @link http://pear.php.net/package/DB */ @@ -225,10 +225,18 @@ $connect_function = $persistent ? 'oci_pconnect' : 'oci_connect'; } + + // Backwards compatibility with DB < 1.7.0 + if (empty($dsn['database']) && !empty($dsn['hostspec'])) { + $db = $dsn['hostspec']; + } else { + $db = $dsn['database']; + } + $char = empty($dsn['charset']) ? null : $dsn['charset']; $this->connection = @$connect_function($dsn['username'], $dsn['password'], - $dsn['database'], + $db, $char); $error = OCIError(); if (!empty($error) && $error['code'] == 12541) {

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