Index: /branches/2.0/workflow/setup/default_records.inc.php
===================================================================
--- /branches/2.0/workflow/setup/default_records.inc.php	(revision 1977)
+++ /branches/2.0/workflow/setup/default_records.inc.php	(revision 2569)
@@ -19,4 +19,5 @@
 		'dbname' => $GLOBALS['phpgw']->ADOdb->database,
 		'host' => $GLOBALS['phpgw']->ADOdb->host,
+		'port' => $GLOBALS['phpgw']->ADOdb->port,
 		'user' => $GLOBALS['phpgw']->ADOdb->user,
 		'password' => $GLOBALS['phpgw']->ADOdb->password);
@@ -33,9 +34,10 @@
 	}
 }
+
 if (($workflowHostInfo['password']{0} == "'") && ($workflowHostInfo['password']{strlen($workflowHostInfo['password'])-1} == "'"))
 	$workflowHostInfo['password'] = substr($workflowHostInfo['password'], 1, strlen($workflowHostInfo['password']) - 2);
 
 /* connect to the egroupware database */
-$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 
 /* create the workflow database */
@@ -61,5 +63,5 @@
 /* connect to the new database */
 $workflowDB = $GLOBALS['phpgw']->ADOdb;
-if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 {
 	/* create a sample application (Music CD Loan) */
@@ -135,5 +137,5 @@
 
 /* reconnect to the previous database */
-$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 
 ?>
Index: /branches/2.0/workflow/setup/tables_update.inc.php
===================================================================
--- /branches/2.0/workflow/setup/tables_update.inc.php	(revision 2185)
+++ /branches/2.0/workflow/setup/tables_update.inc.php	(revision 2569)
@@ -20,4 +20,5 @@
 				'dbname' => $GLOBALS['phpgw']->ADOdb->database,
 				'host' => $GLOBALS['phpgw']->ADOdb->host,
+				'port' => $GLOBALS['phpgw']->ADOdb->port,
 				'user' => $GLOBALS['phpgw']->ADOdb->user,
 				'password' => $GLOBALS['phpgw']->ADOdb->password);
@@ -415,5 +416,5 @@
 			/* connect to the new database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* create a sample application (Music CD Loan) */
@@ -482,5 +483,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -514,5 +515,5 @@
 			/* connect to the workflow database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* change the type of the employee ID (funcionario_id field) */
@@ -538,5 +539,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -573,5 +574,5 @@
 			/* connect to the new database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* add a new column to the area table (orgchart) */
@@ -581,5 +582,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -638,5 +639,5 @@
 			/* connect to the Workflow database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				$result = $GLOBALS['phpgw']->ADOdb->query('SELECT admin_access_id, tipo, numvalue, nivel FROM admin_access');
@@ -668,5 +669,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 			foreach ($adminAccessData as $newRow)
 				$result = $GLOBALS['phpgw']->ADOdb->query("INSERT INTO egw_wf_admin_access(admin_access_id, tipo, numvalue, nivel) VALUES (?, ?, ?, ?)", $newRow);
@@ -694,5 +695,5 @@
 			/* connect to the new database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* add a new column to the funcionario_status table (orgchart) */
@@ -703,5 +704,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -738,5 +739,5 @@
 			/* connect to the new database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* add a new column to the organizacao table (orgchart) */
@@ -745,5 +746,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -780,5 +781,5 @@
 			/* connect to the new database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* create the new tables and add the referencial constraints */
@@ -808,5 +809,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -933,5 +934,5 @@
 			/* connect to the new database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				$result = $workflowDB->query("SELECT 1 FROM pg_tables WHERE (schemaname = 'public') AND (tablename = 'funcionario_status')");
@@ -957,5 +958,5 @@
 			}
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -1039,5 +1040,5 @@
 			/* connect to the new database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* add a new column to the area organization (orgchart) */
@@ -1048,5 +1049,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -1065,5 +1066,5 @@
 			/* connect to the new database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* gather some information */
@@ -1109,5 +1110,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 
@@ -1157,5 +1158,5 @@
 			/* connect to workflow database */
 			$workflowDB = $GLOBALS['phpgw']->ADOdb;
-			if ($workflowDB->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
+			if ($workflowDB->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], 'workflow'))
 			{
 				/* add the new columns */
@@ -1183,5 +1184,5 @@
 
 			/* reconnect to the previous database */
-			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
+			$GLOBALS['phpgw']->ADOdb->connect($workflowHostInfo['host'].":".$workflowHostInfo['port'], $workflowHostInfo['user'], $workflowHostInfo['password'], $workflowHostInfo['dbname']);
 		}
 		#updating the current version
@@ -1215,5 +1216,5 @@
 	{
 		#updating the current version
-		$GLOBALS['setup_info']['workflow']['currentver'] = '2.0.003';
+		$GLOBALS['setup_info']['workflow']['currentver'] = '2.1.000';
 		return $GLOBALS['setup_info']['workflow']['currentver'];
 	}
