diff --git a/header.inc.php.template b/header.inc.php.template
index 90c02dcc91..0b9094cec3 100644
--- a/header.inc.php.template
+++ b/header.inc.php.template
@@ -92,7 +92,7 @@
$GLOBALS['phpgw_info']['server']['versions']['phpgwapi'] = $setup_info['phpgwapi']['version'];
$GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info);
- $GLOBALS['phpgw_info']['server']['versions']['header'] = '1.24';
+ $GLOBALS['phpgw_info']['server']['versions']['header'] = '1.25';
/* This is a fix for NT */
if(!isset($GLOBALS['phpgw_info']['flags']['noapi']) || !$GLOBALS['phpgw_info']['flags']['noapi'] == True)
{
@@ -107,6 +107,7 @@
*/
$GLOBALS['phpgw_domain']['{DB_DOMAIN}'] = array (
'db_host' => '{DB_HOST}',
+ 'db_port' => '{DB_PORT}',
'db_name' => '{DB_NAME}',
'db_user' => '{DB_USER}',
'db_pass' => '{DB_PASS}',
diff --git a/phpgwapi/inc/class.db.inc.php b/phpgwapi/inc/class.db.inc.php
index f7a06f1590..d95e027c12 100644
--- a/phpgwapi/inc/class.db.inc.php
+++ b/phpgwapi/inc/class.db.inc.php
@@ -42,6 +42,11 @@
*/
var $Host = '';
+ /**
+ * @var string $Port port number of database to connect to
+ */
+ var $Port = '';
+
/**
* @var string $Database name of database to use
*/
@@ -143,7 +148,7 @@
* @param string $User name of database user (optional)
* @var string $Password password for database user (optional)
*/
- function connect($Database = '', $Host = '', $User = '', $Password = '')
+ function connect($Database = '', $Host = '', $Port = '', $User = '', $Password = '')
{
/* Handle defaults */
if ($Database == '')
@@ -154,6 +159,14 @@
{
$Host = $this->Host;
}
+ if ($Port == '')
+ {
+ $Port = $this->Port;
+ }
+ if (isset($Port))
+ {
+ $Host = $Host.':'.$Port;
+ }
if ($User == '')
{
$User = $this->User;
@@ -162,6 +175,7 @@
{
$Password = $this->Password;
}
+
if (!$this->Link_ID)
{
$this->type = $GLOBALS['phpgw_info']['server']['db_type'];
diff --git a/phpgwapi/inc/class.db_msql.inc.php b/phpgwapi/inc/class.db_msql.inc.php
index 5433a505db..708123e3d9 100644
--- a/phpgwapi/inc/class.db_msql.inc.php
+++ b/phpgwapi/inc/class.db_msql.inc.php
@@ -17,7 +17,7 @@
class db
{
- function connect($Database = '', $Host = '', $User = '', $Password = '')
+ function connect($Database = '', $Host = '', $Port = '', $User = '', $Password = '')
{
/* Handle defaults */
if ($Database == '')
@@ -28,6 +28,10 @@
{
$Host = $this->Host;
}
+ if ($Port == '')
+ {
+ $Port = $this->Port;
+ }
if ($User == '')
{
$User = $this->User;
@@ -36,6 +40,7 @@
{
$Password = $this->Password;
}
+ $Host = $Host.':'.$Port;
// Not connected? Then connect?
if (! $this->Link_ID)
diff --git a/phpgwapi/inc/class.db_mssql.inc.php b/phpgwapi/inc/class.db_mssql.inc.php
index a6d2532dae..b3b0422bfe 100644
--- a/phpgwapi/inc/class.db_mssql.inc.php
+++ b/phpgwapi/inc/class.db_mssql.inc.php
@@ -24,7 +24,7 @@
var $VEOF = -1;
var $Transaction = false;
- function connect($Database = '', $Host = '', $User = '', $Password = '')
+ function connect($Database = '', $Host = '', $Port = '', $User = '', $Password = '')
{
/* Handle defaults */
if ($Database == '')
@@ -35,6 +35,10 @@
{
$Host = $this->Host;
}
+ if ($Port == '')
+ {
+ $Port = $this->Port;
+ }
if ($User == '')
{
$User = $this->User;
@@ -43,6 +47,7 @@
{
$Password = $this->Password;
}
+ $Host = $Host.':'.$Port;
if (! $this->Link_ID )
{
diff --git a/phpgwapi/inc/class.db_mysql.inc.php b/phpgwapi/inc/class.db_mysql.inc.php
index 0e21435e53..c24f4d5e73 100644
--- a/phpgwapi/inc/class.db_mysql.inc.php
+++ b/phpgwapi/inc/class.db_mysql.inc.php
@@ -18,7 +18,7 @@
{
/* public: this is an api revision, not a CVS revision. */
var $type = 'mysql';
- var $revision = '1.2';
+ var $revision = '1.3';
function db($query = '')
{
@@ -26,7 +26,7 @@
}
/* public: connection management */
- function connect($Database = '', $Host = '', $User = '', $Password = '')
+ function connect($Database = '', $Host = '', $Port = '', $User = '', $Password = '')
{
/* Handle defaults */
if ($Database == '')
@@ -37,6 +37,10 @@
{
$Host = $this->Host;
}
+ if ($Port == '')
+ {
+ $Port = isset($this->Port) ? $this->Port : '3306';
+ }
if ($User == '')
{
$User = $this->User;
@@ -45,6 +49,8 @@
{
$Password = $this->Password;
}
+ $Host = $Host.':'.$Port;
+
/* establish connection, select database */
if (! $this->Link_ID)
{
@@ -56,7 +62,6 @@
{
$this->Link_ID=mysql_connect($Host, $User, $Password);
}
-
if (!$this->Link_ID)
{
$this->halt(($GLOBALS['phpgw_info']['server']['db_persistent']?'p':'')."connect($Host, $User, \$Password) failed.");
diff --git a/phpgwapi/inc/class.db_oracle.inc.php b/phpgwapi/inc/class.db_oracle.inc.php
index cd92a4edfd..b6b735411f 100644
--- a/phpgwapi/inc/class.db_oracle.inc.php
+++ b/phpgwapi/inc/class.db_oracle.inc.php
@@ -24,7 +24,7 @@
/* copied from db_mysql for completeness */
/* public: identification constant. never change this. */
var $type = 'oracle';
- var $revision = '1.2';
+ var $revision = '1.3';
/* public: constructor */
function db($query = '')
@@ -32,7 +32,7 @@
$this->db_($query);
}
- function connect($Database = '', $Host = '', $User = '', $Password = '')
+ function connect($Database = '', $Host = '', $Port = '', $User = '', $Password = '')
{
/* Handle defaults */
if ($Database == '')
@@ -43,6 +43,10 @@
{
$Host = $this->Host;
}
+ if ($Port == '')
+ {
+ $Port = $this->Port;
+ }
if ($User == '')
{
$User = $this->User;
diff --git a/phpgwapi/inc/class.db_pgsql.inc.php b/phpgwapi/inc/class.db_pgsql.inc.php
index a631ca217e..a06a523408 100644
--- a/phpgwapi/inc/class.db_pgsql.inc.php
+++ b/phpgwapi/inc/class.db_pgsql.inc.php
@@ -36,7 +36,7 @@
$this->db_($query);
}
- function connect($Database = '', $Host = '', $User = '', $Password = '')
+ function connect($Database = '', $Host = '', $Port = '', $User = '', $Password = '')
{
/* Handle defaults */
if ($Database == '')
@@ -47,6 +47,10 @@
{
$Host = $this->Host;
}
+ if ($Port == '')
+ {
+ $Port = $this->Port;
+ }
if ($User == '')
{
$User = $this->User;
@@ -55,7 +59,6 @@
{
$Password = $this->Password;
}
-
if (! $this->Link_ID)
{
$cstr = 'dbname=' . $Database
diff --git a/phpgwapi/inc/class.db_sybase.inc.php b/phpgwapi/inc/class.db_sybase.inc.php
index 9f1017f925..9e9ae9993f 100644
--- a/phpgwapi/inc/class.db_sybase.inc.php
+++ b/phpgwapi/inc/class.db_sybase.inc.php
@@ -20,7 +20,7 @@
class db
{
- function connect($Database = '', $Host = '', $User = '', $Password = '')
+ function connect($Database = '', $Host = '', $Port = '', $User = '', $Password = '')
{
/* Handle defaults */
if ($Database == '')
@@ -31,6 +31,10 @@
{
$Host = $this->Host;
}
+ if ($Port == '')
+ {
+ $Port = $this->Port;
+ }
if ($User == '')
{
$User = $this->User;
diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php
index 64bd0e013a..e1f14ade3a 100644
--- a/phpgwapi/inc/functions.inc.php
+++ b/phpgwapi/inc/functions.inc.php
@@ -106,6 +106,7 @@
if (@isset($GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]))
{
$GLOBALS['phpgw_info']['server']['db_host'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]['db_host'];
+ $GLOBALS['phpgw_info']['server']['db_port'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]['db_port'];
$GLOBALS['phpgw_info']['server']['db_name'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]['db_name'];
$GLOBALS['phpgw_info']['server']['db_user'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]['db_user'];
$GLOBALS['phpgw_info']['server']['db_pass'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['user']['domain']]['db_pass'];
@@ -114,6 +115,7 @@
else
{
$GLOBALS['phpgw_info']['server']['db_host'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['server']['default_domain']]['db_host'];
+ $GLOBALS['phpgw_info']['server']['db_port'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['server']['default_domain']]['db_port'];
$GLOBALS['phpgw_info']['server']['db_name'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['server']['default_domain']]['db_name'];
$GLOBALS['phpgw_info']['server']['db_user'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['server']['default_domain']]['db_user'];
$GLOBALS['phpgw_info']['server']['db_pass'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['server']['default_domain']]['db_pass'];
@@ -137,6 +139,7 @@
\************************************************************************/
$GLOBALS['phpgw']->db = CreateObject('phpgwapi.db');
$GLOBALS['phpgw']->db->Host = $GLOBALS['phpgw_info']['server']['db_host'];
+ $GLOBALS['phpgw']->db->Port = $GLOBALS['phpgw_info']['server']['db_port'];
$GLOBALS['phpgw']->db->Type = $GLOBALS['phpgw_info']['server']['db_type'];
$GLOBALS['phpgw']->db->Database = $GLOBALS['phpgw_info']['server']['db_name'];
$GLOBALS['phpgw']->db->User = $GLOBALS['phpgw_info']['server']['db_user'];
diff --git a/phpgwapi/setup/setup.inc.php b/phpgwapi/setup/setup.inc.php
index aa0bc68f0e..84d276ebe5 100755
--- a/phpgwapi/setup/setup.inc.php
+++ b/phpgwapi/setup/setup.inc.php
@@ -16,7 +16,7 @@
$setup_info['phpgwapi']['name'] = 'phpgwapi';
$setup_info['phpgwapi']['title'] = 'phpgwapi';
$setup_info['phpgwapi']['version'] = '0.9.99.008';
- $setup_info['phpgwapi']['versions']['current_header'] = '1.24';
+ $setup_info['phpgwapi']['versions']['current_header'] = '1.25';
$setup_info['phpgwapi']['enable'] = 3;
$setup_info['phpgwapi']['app_order'] = 1;
diff --git a/setup/lang/phpgw_en.lang b/setup/lang/phpgw_en.lang
index 9dcec8c01a..7fab6bcafe 100644
--- a/setup/lang/phpgw_en.lang
+++ b/setup/lang/phpgw_en.lang
@@ -88,6 +88,7 @@ datetime port.
if using port 13, please set firewall rules appropriately befo
db host setup en DB Host
db name setup en DB Name
db password setup en DB Password
+db port setup en DB Port
db root password setup en DB root password
db root username setup en DB root username
db type setup en DB Type
@@ -315,6 +316,7 @@ tables dropped setup en tables dropped
tables installed, unless there are errors printed above setup en tables installed, unless there are errors printed above
tables upgraded setup en tables upgraded
target version setup en Target Version
+TCP port number of database server setup en TCP port number of database server
text entry setup en Text Entry
the db_type in defaults (%1) is not supported on this server. using first supported type. setup en The db_type in defaults (%1) is not supported on this server. using first supported type.
the file setup en the file
diff --git a/setup/manageheader.php b/setup/manageheader.php
index 0e8e254522..ac22aef481 100644
--- a/setup/manageheader.php
+++ b/setup/manageheader.php
@@ -213,10 +213,12 @@
$detected .= '
@@ -8,7 +24,7 @@ | |
{lang_settings} |
---|