cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php mysqli.php pgsql.php querysim.php sqlite.php
| From: | Lukas Smith | Date: | Fri, 04 Mar 2005 10:22:38 +0000 |
| Subject: | cvs: pear /MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php mysqli.php pgsql.php querysim.php sqlite.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-30045@lists.php.net to get a copy of this message | ||
lsmith Fri Mar 4 05:22:38 2005 EDT
Modified files:
/pear/MDB2/MDB2/Driver fbsql.php ibase.php mssql.php mysql.php
mysqli.php pgsql.php querysim.php sqlite.php
Log:
- removed use of $dsninfo alias alltogether (bug #3642)
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.50&r2=1.51&ty=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.50 pear/MDB2/MDB2/Driver/fbsql.php:1.51 --- pear/MDB2/MDB2/Driver/fbsql.php:1.50 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/fbsql.php Fri Mar 4 05:22:33 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.50 2005/02/22 09:51:19 lsmith Exp $ +// $Id: fbsql.php,v 1.51 2005/03/04 10:22:33 lsmith Exp $ // /** @@ -243,11 +243,9 @@ $function = ($this->options['persistent'] ? 'fbsql_pconnect' : 'fbsql_connect'); - $dsninfo = $this->dsn; - - $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; - $user = $dsninfo['username']; - $pw = $dsninfo['password']; + $dbhost = $this->dsn['hostspec'] ? $this->dsn['hostspec'] : 'localhost'; + $user = $this->dsn['username']; + $pw = $this->dsn['password']; if ($dbhost && $user && $pw) { $connection = @$function($dbhost, $user, $pw); @@ -264,7 +262,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = ''; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; return MDB2_OK; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.76&r2=1.77&ty=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.76 pear/MDB2/MDB2/Driver/ibase.php:1.77 --- pear/MDB2/MDB2/Driver/ibase.php:1.76 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/ibase.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.76 2005/02/22 09:51:19 lsmith Exp $ +// $Id: ibase.php,v 1.77 2005/03/04 10:22:34 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -306,20 +306,19 @@ */ function _doConnect($database_name, $persistent = false) { - $dsninfo = $this->dsn; - $user = $dsninfo['username']; - $pw = $dsninfo['password']; - $dbhost = $dsninfo['hostspec'] ? - ($dsninfo['hostspec'].':'.$database_name) : $database_name; + $user = $this->dsn['username']; + $pw = $this->dsn['password']; + $dbhost = $this->dsn['hostspec'] ? + ($this->dsn['hostspec'].':'.$database_name) : $database_name; $params = array(); $params[] = $dbhost; $params[] = !empty($user) ? $user : null; $params[] = !empty($pw) ? $pw : null; - $params[] = isset($dsninfo['charset']) ? $dsninfo['charset'] : null; - $params[] = isset($dsninfo['buffers']) ? $dsninfo['buffers'] : null; - $params[] = isset($dsninfo['dialect']) ? $dsninfo['dialect'] : null; - $params[] = isset($dsninfo['role']) ? $dsninfo['role'] : null; + $params[] = isset($this->dsn['charset']) ? $this->dsn['charset'] : null; + $params[] = isset($this->dsn['buffers']) ? $this->dsn['buffers'] : null; + $params[] = isset($this->dsn['dialect']) ? $this->dsn['dialect'] : null; + $params[] = isset($this->dsn['role']) ? $this->dsn['role'] : null; $function = ($persistent ? 'ibase_pconnect' : 'ibase_connect'); $connection = @call_user_func_array($function, $params); @@ -373,7 +372,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = $database_file; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; } return MDB2_OK; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.56&r2=1.57&ty=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.56 pear/MDB2/MDB2/Driver/mssql.php:1.57 --- pear/MDB2/MDB2/Driver/mssql.php:1.56 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/mssql.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.56 2005/02/22 09:51:19 lsmith Exp $ +// $Id: mssql.php,v 1.57 2005/03/04 10:22:34 lsmith Exp $ // /** @@ -255,14 +255,13 @@ $function = ($this->options['persistent'] ? 'mssql_pconnect' : 'mssql_connect'); - $dsninfo = $this->dsn; - $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; - if ($dsninfo['port']) { + $dbhost = $this->dsn['hostspec'] ? $this->dsn['hostspec'] : 'localhost'; + if ($this->dsn['port']) { $dbhost .= ((substr(PHP_OS, 0, 3) == 'WIN') ? ',' : ':') - . $dsninfo['port']; + . $this->dsn['port']; } - $user = $dsninfo['username']; - $pw = $dsninfo['password']; + $user = $this->dsn['username']; + $pw = $this->dsn['password']; if ($dbhost && $user && $pw) { $connection = @$function($dbhost, $user, $pw); @@ -279,7 +278,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = ''; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; if ((bool) ini_get('mssql.datetimeconvert')) { ini_set('mssql.datetimeconvert', '0'); http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.52&r2=1.53&ty=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.52 pear/MDB2/MDB2/Driver/mysql.php:1.53 --- pear/MDB2/MDB2/Driver/mysql.php:1.52 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/mysql.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.52 2005/02/22 09:51:19 lsmith Exp $ +// $Id: mysql.php,v 1.53 2005/03/04 10:22:34 lsmith Exp $ // /** @@ -308,17 +308,16 @@ $function = ($this->options['persistent'] ? 'mysql_pconnect' : 'mysql_connect'); - $dsninfo = $this->dsn; - if (isset($dsninfo['protocol']) && $dsninfo['protocol'] == 'unix') { - $dbhost = ':' . $dsninfo['socket']; + if (isset($this->dsn['protocol']) && $this->dsn['protocol'] == 'unix') { + $dbhost = ':' . $this->dsn['socket']; } else { - $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; - if (!empty($dsninfo['port'])) { - $dbhost .= ':' . $dsninfo['port']; + $dbhost = $this->dsn['hostspec'] ? $this->dsn['hostspec'] : 'localhost'; + if (!empty($this->dsn['port'])) { + $dbhost .= ':' . $this->dsn['port']; } } - $user = $dsninfo['username']; - $pw = $dsninfo['password']; + $user = $this->dsn['username']; + $pw = $this->dsn['password']; $connection = @$function($dbhost, $user, $pw, true); if ($connection <= 0) { @@ -328,7 +327,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = ''; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; $this->supported['transactions'] = false; if ($this->options['default_table_type']) { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysqli.php?r1=1.9&r2=1.10&ty=u Index: pear/MDB2/MDB2/Driver/mysqli.php diff -u pear/MDB2/MDB2/Driver/mysqli.php:1.9 pear/MDB2/MDB2/Driver/mysqli.php:1.10 --- pear/MDB2/MDB2/Driver/mysqli.php:1.9 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/mysqli.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.9 2005/02/22 09:51:19 lsmith Exp $ +// $Id: mysqli.php,v 1.10 2005/03/04 10:22:34 lsmith Exp $ // /** @@ -304,31 +304,31 @@ $init = @mysqli_init(); @mysqli_ssl_set( $init, - empty($dsninfo['key']) ? null : $dsninfo['key'], - empty($dsninfo['cert']) ? null : $dsninfo['cert'], - empty($dsninfo['ca']) ? null : $dsninfo['ca'], - empty($dsninfo['capath']) ? null : $dsninfo['capath'], - empty($dsninfo['cipher']) ? null : $dsninfo['cipher'] + empty($this->dsn['key']) ? null : $this->dsn['key'], + empty($this->dsn['cert']) ? null : $this->dsn['cert'], + empty($this->dsn['ca']) ? null : $this->dsn['ca'], + empty($this->dsn['capath']) ? null : $this->dsn['capath'], + empty($this->dsn['cipher']) ? null : $this->dsn['cipher'] ); if ($connection = @mysqli_real_connect( $init, - $dsninfo['hostspec'], - $dsninfo['username'], - $dsninfo['password'], - $dsninfo['database'], - $dsninfo['port'], - $dsninfo['socket']) + $this->dsn['hostspec'], + $this->dsn['username'], + $this->dsn['password'], + $this->dsn['database'], + $this->dsn['port'], + $this->dsn['socket']) ) { $connection = $init; } } else { $connection = @mysqli_connect( - $dsninfo['hostspec'], - $dsninfo['username'], - $dsninfo['password'], - $dsninfo['database'], - $dsninfo['port'], - $dsninfo['socket'] + $this->dsn['hostspec'], + $this->dsn['username'], + $this->dsn['password'], + $this->dsn['database'], + $this->dsn['port'], + $this->dsn['socket'] ); } @@ -339,7 +339,7 @@ $this->connection = $connection; $this->connected_dsn = $this->dsn; $this->connected_database_name = ''; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; $this->supported['transactions'] = false; if ($this->options['default_table_type']) { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/pgsql.php?r1=1.53&r2=1.54&ty=u Index: pear/MDB2/MDB2/Driver/pgsql.php diff -u pear/MDB2/MDB2/Driver/pgsql.php:1.53 pear/MDB2/MDB2/Driver/pgsql.php:1.54 --- pear/MDB2/MDB2/Driver/pgsql.php:1.53 Fri Mar 4 04:54:03 2005 +++ pear/MDB2/MDB2/Driver/pgsql.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.53 2005/03/04 09:54:03 lsmith Exp $ +// $Id: pgsql.php,v 1.54 2005/03/04 10:22:34 lsmith Exp $ /** * MDB2 PostGreSQL driver @@ -225,41 +225,41 @@ if ($database_name == '') { $database_name = 'template1'; } - $dsninfo = $this->dsn; - $protocol = (isset($dsninfo['protocol'])) ? $dsninfo['protocol'] : 'tcp'; + + $protocol = (isset($this->dsn['protocol'])) ? $this->dsn['protocol'] : 'tcp'; $connstr = ''; if ($protocol == 'tcp') { - if ($dsninfo['hostspec']) { - $connstr .= ' host=' . $dsninfo['hostspec']; + if ($this->dsn['hostspec']) { + $connstr .= ' host=' . $this->dsn['hostspec']; } - if ($dsninfo['port']) { - $connstr .= ' port=' . $dsninfo['port']; + if ($this->dsn['port']) { + $connstr .= ' port=' . $this->dsn['port']; } } elseif ($protocol == 'unix') { // Allow for pg socket in non-standard locations. - if ($dsninfo['socket']) { - $connstr .= ' host=' . $dsninfo['socket']; + if ($this->dsn['socket']) { + $connstr .= ' host=' . $this->dsn['socket']; } - if ($dsninfo['port']) { - $connstr .= ' port=' . $dsninfo['port']; + if ($this->dsn['port']) { + $connstr .= ' port=' . $this->dsn['port']; } } if (isset($database_name)) { $connstr .= ' dbname=\'' . addslashes($database_name) . '\''; } - if (!empty($dsninfo['username'])) { - $connstr .= ' user=\'' . addslashes($dsninfo['username']) . '\''; + if (!empty($this->dsn['username'])) { + $connstr .= ' user=\'' . addslashes($this->dsn['username']) . '\''; } - if (!empty($dsninfo['password'])) { - $connstr .= ' password=\'' . addslashes($dsninfo['password']) . '\''; + if (!empty($this->dsn['password'])) { + $connstr .= ' password=\'' . addslashes($this->dsn['password']) . '\''; } - if (!empty($dsninfo['options'])) { - $connstr .= ' options=' . $dsninfo['options']; + if (!empty($this->dsn['options'])) { + $connstr .= ' options=' . $this->dsn['options']; } - if (!empty($dsninfo['tty'])) { - $connstr .= ' tty=' . $dsninfo['tty']; + if (!empty($this->dsn['tty'])) { + $connstr .= ' tty=' . $this->dsn['tty']; } putenv('PGDATESTYLE=ISO'); http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/querysim.php?r1=1.31&r2=1.32&ty=u Index: pear/MDB2/MDB2/Driver/querysim.php diff -u pear/MDB2/MDB2/Driver/querysim.php:1.31 pear/MDB2/MDB2/Driver/querysim.php:1.32 --- pear/MDB2/MDB2/Driver/querysim.php:1.31 Wed Jan 12 14:55:24 2005 +++ pear/MDB2/MDB2/Driver/querysim.php Fri Mar 4 05:22:34 2005 @@ -61,7 +61,7 @@ // | please contact Alan Richmond. | // +----------------------------------------------------------------------+ // -// $Id: querysim.php,v 1.31 2005/01/12 19:55:24 lsmith Exp $ +// $Id: querysim.php,v 1.32 2005/03/04 10:22:34 lsmith Exp $ // /* @@ -297,7 +297,7 @@ $this->connection = $connection; $this->connected_database_name = $this->database_name; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; return MDB2_OK; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.52&r2=1.53&ty=u Index: pear/MDB2/MDB2/Driver/sqlite.php diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.52 pear/MDB2/MDB2/Driver/sqlite.php:1.53 --- pear/MDB2/MDB2/Driver/sqlite.php:1.52 Tue Feb 22 04:51:42 2005 +++ pear/MDB2/MDB2/Driver/sqlite.php Fri Mar 4 05:22:35 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.52 2005/02/22 09:51:42 lsmith Exp $ +// $Id: sqlite.php,v 1.53 2005/03/04 10:22:35 lsmith Exp $ // /** @@ -313,7 +313,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = $database_file; $this->opened_persistent = $this->getoption('persistent'); - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; } return MDB2_OK; }
http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/fbsql.php?r1=1.50&r2=1.51&ty=u Index: pear/MDB2/MDB2/Driver/fbsql.php diff -u pear/MDB2/MDB2/Driver/fbsql.php:1.50 pear/MDB2/MDB2/Driver/fbsql.php:1.51 --- pear/MDB2/MDB2/Driver/fbsql.php:1.50 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/fbsql.php Fri Mar 4 05:22:33 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: fbsql.php,v 1.50 2005/02/22 09:51:19 lsmith Exp $ +// $Id: fbsql.php,v 1.51 2005/03/04 10:22:33 lsmith Exp $ // /** @@ -243,11 +243,9 @@ $function = ($this->options['persistent'] ? 'fbsql_pconnect' : 'fbsql_connect'); - $dsninfo = $this->dsn; - - $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; - $user = $dsninfo['username']; - $pw = $dsninfo['password']; + $dbhost = $this->dsn['hostspec'] ? $this->dsn['hostspec'] : 'localhost'; + $user = $this->dsn['username']; + $pw = $this->dsn['password']; if ($dbhost && $user && $pw) { $connection = @$function($dbhost, $user, $pw); @@ -264,7 +262,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = ''; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; return MDB2_OK; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/ibase.php?r1=1.76&r2=1.77&ty=u Index: pear/MDB2/MDB2/Driver/ibase.php diff -u pear/MDB2/MDB2/Driver/ibase.php:1.76 pear/MDB2/MDB2/Driver/ibase.php:1.77 --- pear/MDB2/MDB2/Driver/ibase.php:1.76 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/ibase.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.76 2005/02/22 09:51:19 lsmith Exp $ +// $Id: ibase.php,v 1.77 2005/03/04 10:22:34 lsmith Exp $ /** * MDB2 FireBird/InterBase driver @@ -306,20 +306,19 @@ */ function _doConnect($database_name, $persistent = false) { - $dsninfo = $this->dsn; - $user = $dsninfo['username']; - $pw = $dsninfo['password']; - $dbhost = $dsninfo['hostspec'] ? - ($dsninfo['hostspec'].':'.$database_name) : $database_name; + $user = $this->dsn['username']; + $pw = $this->dsn['password']; + $dbhost = $this->dsn['hostspec'] ? + ($this->dsn['hostspec'].':'.$database_name) : $database_name; $params = array(); $params[] = $dbhost; $params[] = !empty($user) ? $user : null; $params[] = !empty($pw) ? $pw : null; - $params[] = isset($dsninfo['charset']) ? $dsninfo['charset'] : null; - $params[] = isset($dsninfo['buffers']) ? $dsninfo['buffers'] : null; - $params[] = isset($dsninfo['dialect']) ? $dsninfo['dialect'] : null; - $params[] = isset($dsninfo['role']) ? $dsninfo['role'] : null; + $params[] = isset($this->dsn['charset']) ? $this->dsn['charset'] : null; + $params[] = isset($this->dsn['buffers']) ? $this->dsn['buffers'] : null; + $params[] = isset($this->dsn['dialect']) ? $this->dsn['dialect'] : null; + $params[] = isset($this->dsn['role']) ? $this->dsn['role'] : null; $function = ($persistent ? 'ibase_pconnect' : 'ibase_connect'); $connection = @call_user_func_array($function, $params); @@ -373,7 +372,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = $database_file; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; } return MDB2_OK; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mssql.php?r1=1.56&r2=1.57&ty=u Index: pear/MDB2/MDB2/Driver/mssql.php diff -u pear/MDB2/MDB2/Driver/mssql.php:1.56 pear/MDB2/MDB2/Driver/mssql.php:1.57 --- pear/MDB2/MDB2/Driver/mssql.php:1.56 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/mssql.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Frank M. Kromann <frank@kromann.info> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.56 2005/02/22 09:51:19 lsmith Exp $ +// $Id: mssql.php,v 1.57 2005/03/04 10:22:34 lsmith Exp $ // /** @@ -255,14 +255,13 @@ $function = ($this->options['persistent'] ? 'mssql_pconnect' : 'mssql_connect'); - $dsninfo = $this->dsn; - $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; - if ($dsninfo['port']) { + $dbhost = $this->dsn['hostspec'] ? $this->dsn['hostspec'] : 'localhost'; + if ($this->dsn['port']) { $dbhost .= ((substr(PHP_OS, 0, 3) == 'WIN') ? ',' : ':') - . $dsninfo['port']; + . $this->dsn['port']; } - $user = $dsninfo['username']; - $pw = $dsninfo['password']; + $user = $this->dsn['username']; + $pw = $this->dsn['password']; if ($dbhost && $user && $pw) { $connection = @$function($dbhost, $user, $pw); @@ -279,7 +278,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = ''; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; if ((bool) ini_get('mssql.datetimeconvert')) { ini_set('mssql.datetimeconvert', '0'); http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysql.php?r1=1.52&r2=1.53&ty=u Index: pear/MDB2/MDB2/Driver/mysql.php diff -u pear/MDB2/MDB2/Driver/mysql.php:1.52 pear/MDB2/MDB2/Driver/mysql.php:1.53 --- pear/MDB2/MDB2/Driver/mysql.php:1.52 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/mysql.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.52 2005/02/22 09:51:19 lsmith Exp $ +// $Id: mysql.php,v 1.53 2005/03/04 10:22:34 lsmith Exp $ // /** @@ -308,17 +308,16 @@ $function = ($this->options['persistent'] ? 'mysql_pconnect' : 'mysql_connect'); - $dsninfo = $this->dsn; - if (isset($dsninfo['protocol']) && $dsninfo['protocol'] == 'unix') { - $dbhost = ':' . $dsninfo['socket']; + if (isset($this->dsn['protocol']) && $this->dsn['protocol'] == 'unix') { + $dbhost = ':' . $this->dsn['socket']; } else { - $dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost'; - if (!empty($dsninfo['port'])) { - $dbhost .= ':' . $dsninfo['port']; + $dbhost = $this->dsn['hostspec'] ? $this->dsn['hostspec'] : 'localhost'; + if (!empty($this->dsn['port'])) { + $dbhost .= ':' . $this->dsn['port']; } } - $user = $dsninfo['username']; - $pw = $dsninfo['password']; + $user = $this->dsn['username']; + $pw = $this->dsn['password']; $connection = @$function($dbhost, $user, $pw, true); if ($connection <= 0) { @@ -328,7 +327,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = ''; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; $this->supported['transactions'] = false; if ($this->options['default_table_type']) { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/mysqli.php?r1=1.9&r2=1.10&ty=u Index: pear/MDB2/MDB2/Driver/mysqli.php diff -u pear/MDB2/MDB2/Driver/mysqli.php:1.9 pear/MDB2/MDB2/Driver/mysqli.php:1.10 --- pear/MDB2/MDB2/Driver/mysqli.php:1.9 Tue Feb 22 04:51:19 2005 +++ pear/MDB2/MDB2/Driver/mysqli.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.9 2005/02/22 09:51:19 lsmith Exp $ +// $Id: mysqli.php,v 1.10 2005/03/04 10:22:34 lsmith Exp $ // /** @@ -304,31 +304,31 @@ $init = @mysqli_init(); @mysqli_ssl_set( $init, - empty($dsninfo['key']) ? null : $dsninfo['key'], - empty($dsninfo['cert']) ? null : $dsninfo['cert'], - empty($dsninfo['ca']) ? null : $dsninfo['ca'], - empty($dsninfo['capath']) ? null : $dsninfo['capath'], - empty($dsninfo['cipher']) ? null : $dsninfo['cipher'] + empty($this->dsn['key']) ? null : $this->dsn['key'], + empty($this->dsn['cert']) ? null : $this->dsn['cert'], + empty($this->dsn['ca']) ? null : $this->dsn['ca'], + empty($this->dsn['capath']) ? null : $this->dsn['capath'], + empty($this->dsn['cipher']) ? null : $this->dsn['cipher'] ); if ($connection = @mysqli_real_connect( $init, - $dsninfo['hostspec'], - $dsninfo['username'], - $dsninfo['password'], - $dsninfo['database'], - $dsninfo['port'], - $dsninfo['socket']) + $this->dsn['hostspec'], + $this->dsn['username'], + $this->dsn['password'], + $this->dsn['database'], + $this->dsn['port'], + $this->dsn['socket']) ) { $connection = $init; } } else { $connection = @mysqli_connect( - $dsninfo['hostspec'], - $dsninfo['username'], - $dsninfo['password'], - $dsninfo['database'], - $dsninfo['port'], - $dsninfo['socket'] + $this->dsn['hostspec'], + $this->dsn['username'], + $this->dsn['password'], + $this->dsn['database'], + $this->dsn['port'], + $this->dsn['socket'] ); } @@ -339,7 +339,7 @@ $this->connection = $connection; $this->connected_dsn = $this->dsn; $this->connected_database_name = ''; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; $this->supported['transactions'] = false; if ($this->options['default_table_type']) { http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/pgsql.php?r1=1.53&r2=1.54&ty=u Index: pear/MDB2/MDB2/Driver/pgsql.php diff -u pear/MDB2/MDB2/Driver/pgsql.php:1.53 pear/MDB2/MDB2/Driver/pgsql.php:1.54 --- pear/MDB2/MDB2/Driver/pgsql.php:1.53 Fri Mar 4 04:54:03 2005 +++ pear/MDB2/MDB2/Driver/pgsql.php Fri Mar 4 05:22:34 2005 @@ -43,7 +43,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.53 2005/03/04 09:54:03 lsmith Exp $ +// $Id: pgsql.php,v 1.54 2005/03/04 10:22:34 lsmith Exp $ /** * MDB2 PostGreSQL driver @@ -225,41 +225,41 @@ if ($database_name == '') { $database_name = 'template1'; } - $dsninfo = $this->dsn; - $protocol = (isset($dsninfo['protocol'])) ? $dsninfo['protocol'] : 'tcp'; + + $protocol = (isset($this->dsn['protocol'])) ? $this->dsn['protocol'] : 'tcp'; $connstr = ''; if ($protocol == 'tcp') { - if ($dsninfo['hostspec']) { - $connstr .= ' host=' . $dsninfo['hostspec']; + if ($this->dsn['hostspec']) { + $connstr .= ' host=' . $this->dsn['hostspec']; } - if ($dsninfo['port']) { - $connstr .= ' port=' . $dsninfo['port']; + if ($this->dsn['port']) { + $connstr .= ' port=' . $this->dsn['port']; } } elseif ($protocol == 'unix') { // Allow for pg socket in non-standard locations. - if ($dsninfo['socket']) { - $connstr .= ' host=' . $dsninfo['socket']; + if ($this->dsn['socket']) { + $connstr .= ' host=' . $this->dsn['socket']; } - if ($dsninfo['port']) { - $connstr .= ' port=' . $dsninfo['port']; + if ($this->dsn['port']) { + $connstr .= ' port=' . $this->dsn['port']; } } if (isset($database_name)) { $connstr .= ' dbname=\'' . addslashes($database_name) . '\''; } - if (!empty($dsninfo['username'])) { - $connstr .= ' user=\'' . addslashes($dsninfo['username']) . '\''; + if (!empty($this->dsn['username'])) { + $connstr .= ' user=\'' . addslashes($this->dsn['username']) . '\''; } - if (!empty($dsninfo['password'])) { - $connstr .= ' password=\'' . addslashes($dsninfo['password']) . '\''; + if (!empty($this->dsn['password'])) { + $connstr .= ' password=\'' . addslashes($this->dsn['password']) . '\''; } - if (!empty($dsninfo['options'])) { - $connstr .= ' options=' . $dsninfo['options']; + if (!empty($this->dsn['options'])) { + $connstr .= ' options=' . $this->dsn['options']; } - if (!empty($dsninfo['tty'])) { - $connstr .= ' tty=' . $dsninfo['tty']; + if (!empty($this->dsn['tty'])) { + $connstr .= ' tty=' . $this->dsn['tty']; } putenv('PGDATESTYLE=ISO'); http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/querysim.php?r1=1.31&r2=1.32&ty=u Index: pear/MDB2/MDB2/Driver/querysim.php diff -u pear/MDB2/MDB2/Driver/querysim.php:1.31 pear/MDB2/MDB2/Driver/querysim.php:1.32 --- pear/MDB2/MDB2/Driver/querysim.php:1.31 Wed Jan 12 14:55:24 2005 +++ pear/MDB2/MDB2/Driver/querysim.php Fri Mar 4 05:22:34 2005 @@ -61,7 +61,7 @@ // | please contact Alan Richmond. | // +----------------------------------------------------------------------+ // -// $Id: querysim.php,v 1.31 2005/01/12 19:55:24 lsmith Exp $ +// $Id: querysim.php,v 1.32 2005/03/04 10:22:34 lsmith Exp $ // /* @@ -297,7 +297,7 @@ $this->connection = $connection; $this->connected_database_name = $this->database_name; $this->opened_persistent = $this->options['persistent']; - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; return MDB2_OK; } http://cvs.php.net/diff.php/pear/MDB2/MDB2/Driver/sqlite.php?r1=1.52&r2=1.53&ty=u Index: pear/MDB2/MDB2/Driver/sqlite.php diff -u pear/MDB2/MDB2/Driver/sqlite.php:1.52 pear/MDB2/MDB2/Driver/sqlite.php:1.53 --- pear/MDB2/MDB2/Driver/sqlite.php:1.52 Tue Feb 22 04:51:42 2005 +++ pear/MDB2/MDB2/Driver/sqlite.php Fri Mar 4 05:22:35 2005 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@backendmedia.com> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.52 2005/02/22 09:51:42 lsmith Exp $ +// $Id: sqlite.php,v 1.53 2005/03/04 10:22:35 lsmith Exp $ // /** @@ -313,7 +313,7 @@ $this->connected_dsn = $this->dsn; $this->connected_database_name = $database_file; $this->opened_persistent = $this->getoption('persistent'); - $this->dbsyntax = $dsninfo['dbsyntax'] ? $dsninfo['dbsyntax'] : $this->phptype; + $this->dbsyntax = $this->dsn['dbsyntax'] ? $this->dsn['dbsyntax'] : $this->phptype; } return MDB2_OK; }