From bde5dcc84aca3dc8df45c07a66a140eb4af2bf24 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Wed, 10 Dec 2003 11:40:31 +0000 Subject: [PATCH] Set a default port if the admin is just now upgrading header for the new port spec --- setup/manageheader.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/manageheader.php b/setup/manageheader.php index ac22aef481..d73a4a2709 100644 --- a/setup/manageheader.php +++ b/setup/manageheader.php @@ -371,7 +371,11 @@ $setup_tpl->set_var('lang_delete',lang('Delete')); $setup_tpl->set_var('db_domain',$key); $setup_tpl->set_var('db_host',$GLOBALS['phpgw_domain'][$key]['db_host']); - $setup_tpl->set_var('db_port',$GLOBALS['phpgw_domain'][$key]['db_port']); + /* Set default here if the admin didn't set a port yet */ + $setup_tpl->set_var('db_port',$GLOBALS['phpgw_domain'][$key]['db_port'] + ? $GLOBALS['phpgw_domain'][$key]['db_port'] + : @$default_db_ports[$GLOBALS['phpgw_domain'][$key]['db_type']] + ); $setup_tpl->set_var('db_name',$GLOBALS['phpgw_domain'][$key]['db_name']); $setup_tpl->set_var('db_user',$GLOBALS['phpgw_domain'][$key]['db_user']); $setup_tpl->set_var('db_pass',$GLOBALS['phpgw_domain'][$key]['db_pass']);