cvs: php4 /pear/DB odbc.php pgsql.php storage.php

From: Date: Mon, 19 Feb 2001 00:14:27 +0000
Subject: cvs: php4 /pear/DB odbc.php pgsql.php storage.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-4114@lists.php.net to get a copy of this message
ssb Sun Feb 18 16:14:27 2001 EDT Modified files: /php4/pear/DB odbc.php pgsql.php storage.php Log: odbc.php: load "odbc" extension on demand pgsql.php: unix domain socket support (set hostname to "unix") storage.php: inherit PEAR Index: php4/pear/DB/odbc.php diff -u php4/pear/DB/odbc.php:1.26 php4/pear/DB/odbc.php:1.27 --- php4/pear/DB/odbc.php:1.26 Fri Feb 16 09:14:40 2001 +++ php4/pear/DB/odbc.php Sun Feb 18 16:14:27 2001 @@ -113,6 +113,7 @@ $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; $user = $dsninfo['username']; $pw = $dsninfo['password']; + DB::assertExtension("odbc"); if ($this->provides('pconnect')) { $connect_function = $persistent ? 'odbc_pconnect' : 'odbc_connect'; } else { Index: php4/pear/DB/pgsql.php diff -u php4/pear/DB/pgsql.php:1.28 php4/pear/DB/pgsql.php:1.29 --- php4/pear/DB/pgsql.php:1.28 Sat Feb 17 08:45:01 2001 +++ php4/pear/DB/pgsql.php Sun Feb 18 16:14:27 2001 @@ -85,8 +85,12 @@ if (!$dsninfo || !$dsninfo['phptype']) { return $this->raiseError(); // XXX ERRORMSG } - $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; - $protocol = $dsninfo['protocol'] ? $dsninfo['protocol'] : 'tcp'; + $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'unix'; + if ($dbhost == 'unix') { + $protocol = 'unix'; + } else { + $protocol = $dsninfo['protocol'] ? $dsninfo['protocol'] : 'tcp'; + } $user = $dsninfo['username']; $pw = $dsninfo['password']; $dbname = $dsninfo['database']; Index: php4/pear/DB/storage.php diff -u php4/pear/DB/storage.php:1.11 php4/pear/DB/storage.php:1.12 --- php4/pear/DB/storage.php:1.11 Tue Jan 9 17:01:53 2001 +++ php4/pear/DB/storage.php Sun Feb 18 16:14:27 2001 @@ -21,6 +21,7 @@ // can be manipulated and that updates the database accordingly. // +require_once "PEAR.php"; require_once "DB.php"; function DB_storage_destructor() { @@ -35,7 +36,7 @@ } } -class DB_storage +class DB_storage extends PEAR { /** the name of the table (or view, if the backend database supports updates in views) we hold data from */

« previous php.cvs (#4114) next »