Subversion Repositories Applications.papyrus

Rev

Rev 320 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 320 Rev 443
Line 18... Line 18...
18
 * @package    DB
18
 * @package    DB
19
 * @author     James L. Pine <jlp@valinux.com>
19
 * @author     James L. Pine <jlp@valinux.com>
20
 * @author     Daniel Convissor <danielc@php.net>
20
 * @author     Daniel Convissor <danielc@php.net>
21
 * @copyright  1997-2005 The PHP Group
21
 * @copyright  1997-2005 The PHP Group
22
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
22
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
23
 * @version    CVS: $Id: oci8.php,v 1.1 2005-03-30 08:50:33 jpm Exp $
23
 * @version    CVS: $Id: oci8.php,v 1.2 2005-09-20 17:01:22 ddelon Exp $
24
 * @link       http://pear.php.net/package/DB
24
 * @link       http://pear.php.net/package/DB
25
 */
25
 */
Line 26... Line 26...
26
 
26
 
27
/**
27
/**
Line 45... Line 45...
45
 * @package    DB
45
 * @package    DB
46
 * @author     James L. Pine <jlp@valinux.com>
46
 * @author     James L. Pine <jlp@valinux.com>
47
 * @author     Daniel Convissor <danielc@php.net>
47
 * @author     Daniel Convissor <danielc@php.net>
48
 * @copyright  1997-2005 The PHP Group
48
 * @copyright  1997-2005 The PHP Group
49
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
49
 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
50
 * @version    Release: 1.7.5
50
 * @version    Release: @package_version@
51
 * @link       http://pear.php.net/package/DB
51
 * @link       http://pear.php.net/package/DB
52
 */
52
 */
53
class DB_oci8 extends DB_common
53
class DB_oci8 extends DB_common
54
{
54
{
55
    // {{{ properties
55
    // {{{ properties
Line 223... Line 223...
223
                $connect_function = 'oci_new_connect';
223
                $connect_function = 'oci_new_connect';
224
            } else {
224
            } else {
225
                $connect_function = $persistent ? 'oci_pconnect'
225
                $connect_function = $persistent ? 'oci_pconnect'
226
                                    : 'oci_connect';
226
                                    : 'oci_connect';
227
            }
227
            }
-
 
228
 
-
 
229
            // Backwards compatibility with DB < 1.7.0
-
 
230
            if (empty($dsn['database']) && !empty($dsn['hostspec'])) {
-
 
231
                $db = $dsn['hostspec'];
-
 
232
            } else {
-
 
233
                $db = $dsn['database'];
-
 
234
            }
-
 
235
 
228
            $char = empty($dsn['charset']) ? null : $dsn['charset'];
236
            $char = empty($dsn['charset']) ? null : $dsn['charset'];
229
            $this->connection = @$connect_function($dsn['username'],
237
            $this->connection = @$connect_function($dsn['username'],
230
                                                   $dsn['password'],
238
                                                   $dsn['password'],
231
                                                   $dsn['database'],
239
                                                   $db,
232
                                                   $char);
240
                                                   $char);
233
            $error = OCIError();
241
            $error = OCIError();
234
            if (!empty($error) && $error['code'] == 12541) {
242
            if (!empty($error) && $error['code'] == 12541) {
235
                // Couldn't find TNS listener.  Try direct connection.
243
                // Couldn't find TNS listener.  Try direct connection.
236
                $this->connection = @$connect_function($dsn['username'],
244
                $this->connection = @$connect_function($dsn['username'],