svn commit: r947 - trunk/mapbender/http/php/database-pgsql.php

astrid_emde at osgeo.org astrid_emde at osgeo.org
Thu Nov 23 08:29:16 EST 2006


Author: astrid_emde
Date: 2006-11-23 13:29:16+0000
New Revision: 947

Modified:
   trunk/mapbender/http/php/database-pgsql.php

Log:
PORT was missing in function db_connect

Modified: trunk/mapbender/http/php/database-pgsql.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/database-pgsql.php?view=diff&rev=947&p1=trunk/mapbender/http/php/database-pgsql.php&p2=trunk/mapbender/http/php/database-pgsql.php&r1=946&r2=947
==============================================================================
--- trunk/mapbender/http/php/database-pgsql.php	(original)
+++ trunk/mapbender/http/php/database-pgsql.php	2006-11-23 13:29:16+0000
@@ -61,12 +61,14 @@
 $DB = DB;
 
 function db_connect($DBSERVER="",$OWNER="",$PW="") {
-	global $sys_dbhost,$sys_dbuser,$sys_dbpasswd,$sys_dbname,$db_debug;
+	global $sys_dbhost,$sys_port,$sys_dbuser,$sys_dbpasswd,$sys_dbname,$db_debug;
 	global $conn,$conn_update,$DB;	
 	//global DBSERVER,OWNER,PW,DB;
 	$db_debug=0;
 	if ($DBSERVER)
 		$sys_dbhost = $DBSERVER; 
+	if (PORT)
+		$sys_port = PORT; 
 	if ($OWNER)
 		$sys_dbuser = $OWNER; 
 	if ($PW && $PW != null)
@@ -83,7 +85,9 @@
 		$connstring.=" host=$sys_dbhost";		
 	if ($sys_dbpasswd)		
 		$connstring.=" password=$sys_dbpasswd";		
-	
+	if ($sys_dbpasswd)		
+		$connstring.=" port=$sys_port";		
+			
 	if ($db_debug)
 		echo $connstring." ";		
 
@@ -123,7 +127,7 @@
 	global $sys_dbhost,$sys_dbuser,$sys_dbpasswd,$sys_dbname,$db_debug,
 		$conn,$conn_update,$QUERY_COUNT,$DBSERVER,$OWNER,$PW,$DB;
 	$QUERY_COUNT++;
-	
+
 	$ret = pg_exec($qstring);
 //	$e = new mb_exception("not ps:  ".$_SERVER['SCRIPT_FILENAME']." : ".$qstring);
 	if(!$ret){




More information about the Mapbender_commits mailing list