[21209] Fix for posgresql, use the : notation for using a different port

Caeies <[email protected]> Sun, 02 May 2010 20:16:48 +0000
Newsgroups gmane.comp.web.phpgroupware.cvs
Message-ID <[email protected]>
Revision: 21209
          http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=21209
Author:   Caeies
Date:     2010-05-02 20:16:48 +0000 (Sun, 02 May 2010)
Log Message:
-----------
Fix for posgresql, use the : notation for using a different port

Modified Paths:
--------------
    modules/phpgwapi/branches/branch_0_9_16/inc/class.db_pgsql.inc.php

Modified: modules/phpgwapi/branches/branch_0_9_16/inc/class.db_pgsql.inc.php
===================================================================
--- modules/phpgwapi/branches/branch_0_9_16/inc/class.db_pgsql.inc.php	2010-05-02 20:16:02 UTC (rev 21208)
+++ modules/phpgwapi/branches/branch_0_9_16/inc/class.db_pgsql.inc.php	2010-05-02 20:16:48 UTC (rev 21209)
@@ -72,6 +72,11 @@
 			{
 				$Password = $this->Password;
 			}
+			if(($pos = strpos($Host, ':')) !== False)
+			{
+				$Port = substr($Host, $pos + 1);
+				$Host = substr($Host, 0, $pos);
+			}
 
 			if (! $this->Link_ID)
 			{