cvs: pear /MDB2 MDB2.php

From: Date: Wed, 01 Mar 2006 23:32:36 +0000
Subject: cvs: pear /MDB2 MDB2.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38819@lists.php.net to get a copy of this message
lsmith Wed Mar 1 23:32:36 2006 UTC Modified files: /pear/MDB2 MDB2.php Log: - added ability to specify port number when using unix sockets in MDB2::parseDSN() (bug #5982) http://cvs.php.net/viewcvs.cgi/pear/MDB2/MDB2.php?r1=1.168&r2=1.169&diff_format=u Index: pear/MDB2/MDB2.php diff -u pear/MDB2/MDB2.php:1.168 pear/MDB2/MDB2.php:1.169 --- pear/MDB2/MDB2.php:1.168 Wed Mar 1 12:15:31 2006 +++ pear/MDB2/MDB2.php Wed Mar 1 23:32:36 2006 @@ -43,7 +43,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: MDB2.php,v 1.168 2006/03/01 12:15:31 lsmith Exp $ +// $Id: MDB2.php,v 1.169 2006/03/01 23:32:36 lsmith Exp $ // /** @@ -776,12 +776,11 @@ // process the different protocol options $parsed['protocol'] = (!empty($proto)) ? $proto : 'tcp'; $proto_opts = rawurldecode($proto_opts); + if (strpos($proto_opts, ':') !== false) { + list($proto_opts, $parsed['port']) = explode(':', $proto_opts); + } if ($parsed['protocol'] == 'tcp') { - if (strpos($proto_opts, ':') !== false) { - list($parsed['hostspec'], $parsed['port']) = explode(':', $proto_opts); - } else { - $parsed['hostspec'] = $proto_opts; - } + $parsed['hostspec'] = $proto_opts; } elseif ($parsed['protocol'] == 'unix') { $parsed['socket'] = $proto_opts; }

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