Added support for specifying the port in the server hostname eg. 'localhost:3128'

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@542045 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
hawk__
2012-05-09 20:21:42 +00:00
parent dba478b671
commit e5f2f14aa1

View File

@@ -61,6 +61,11 @@
function wpsql_connect($dbserver, $dbuser, $dbpass)
{
$GLOBALS['pg4wp_connstr'] = '';
list($host, $port) = explode(':', $dbserver);
if( !empty( $host))
$GLOBALS['pg4wp_connstr'] .= ' host='.$host;
if( !empty( $port))
$GLOBALS['pg4wp_connstr'] .= ' port='.$port;
if( !empty( $dbserver))
$GLOBALS['pg4wp_connstr'] .= ' host='.$dbserver;
if( !empty( $dbuser))