non-UTF8 web servers (Markus Bertheau)
* Fix export to work with release candidates and beta releases as well as finals
(Russell Smith)
+* Fix port selection for local connections
Version 3.5.1
-------------
/**
* Class to represent a database connection
*
- * $Id: Connection.php,v 1.7 2005/02/01 16:41:19 chriskl Exp $
+ * $Id: Connection.php,v 1.8 2005/02/06 04:18:58 mr-russ Exp $
*/
include_once('./classes/database/ADODB_base.php');
// Ignore host if null
if ($host === null || $host == '')
- $pghost = '';
+ if ($port !== null && $port != '')
+ $pghost = ':'.$port;
+ else
+ $pghost = '';
else
$pghost = "{$host}:{$port}";
if ($str) {
$host = split(":", $str);
if ($host[0]) $str = "host='" . addslashes($host[0]) . "'";
- else $str = 'localhost';
+ else $str = 'host=localhost';
if (isset($host[1])) $str .= " port='" . addslashes($host[1]) . "'";
}
if ($user) $str .= " user='" . addslashes($user) . "'";