Plugin Directory

Changeset 542045


Ignore:
Timestamp:
05/09/2012 08:21:42 PM (14 years ago)
Author:
hawk__
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postgresql-for-wordpress/trunk/pg4wp/driver_pgsql.php

    r542038 r542045  
    6262    {
    6363        $GLOBALS['pg4wp_connstr'] = '';
     64        list($host, $port) = explode(':', $dbserver);
     65        if( !empty( $host))
     66            $GLOBALS['pg4wp_connstr'] .= ' host='.$host;
     67        if( !empty( $port))
     68            $GLOBALS['pg4wp_connstr'] .= ' port='.$port;
    6469        if( !empty( $dbserver))
    6570            $GLOBALS['pg4wp_connstr'] .= ' host='.$dbserver;
Note: See TracChangeset for help on using the changeset viewer.