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:
@@ -61,6 +61,11 @@
|
|||||||
function wpsql_connect($dbserver, $dbuser, $dbpass)
|
function wpsql_connect($dbserver, $dbuser, $dbpass)
|
||||||
{
|
{
|
||||||
$GLOBALS['pg4wp_connstr'] = '';
|
$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))
|
if( !empty( $dbserver))
|
||||||
$GLOBALS['pg4wp_connstr'] .= ' host='.$dbserver;
|
$GLOBALS['pg4wp_connstr'] .= ' host='.$dbserver;
|
||||||
if( !empty( $dbuser))
|
if( !empty( $dbuser))
|
||||||
|
Reference in New Issue
Block a user