diff --git a/phpgwapi/inc/class.setup_html.inc.php b/phpgwapi/inc/class.setup_html.inc.php
index dff8a5e49a..8b59d5b86d 100644
--- a/phpgwapi/inc/class.setup_html.inc.php
+++ b/phpgwapi/inc/class.setup_html.inc.php
@@ -39,7 +39,7 @@
{
$GLOBALS['header_template']->set_var(strtoupper($x),$y);
}
- $GLOBALS['header_template']->fp('domains','domain',True);
+ $GLOBALS['header_template']->parse('domains','domain',True);
}
$GLOBALS['header_template']->set_var('domain','');
diff --git a/setup/manageheader.php b/setup/manageheader.php
index c6a4e03e82..c6529fad77 100644
--- a/setup/manageheader.php
+++ b/setup/manageheader.php
@@ -21,12 +21,11 @@
);
include('./inc/functions.inc.php');
- include('../phpgwapi/setup/setup.inc.php');
$GLOBALS['phpgw_info']['server']['versions']['current_header'] = $setup_info['phpgwapi']['versions']['current_header'];
unset($setup_info);
#include('../version.inc.php');
- if($GLOBALS['HTTP_POST_VARS']['adddomain'])
+ if(@$GLOBALS['HTTP_POST_VARS']['adddomain'])
{
}
@@ -76,6 +75,7 @@
));
$setup_tpl->set_block('T_login_stage_header','B_multi_domain','V_multi_domain');
$setup_tpl->set_block('T_login_stage_header','B_single_domain','V_single_domain');
+ $setup_tpl->set_block('T_setup_manage','manageheader','manageheader');
$setup_tpl->set_block('T_setup_manage','domain','domain');
/* Detect current mode */
@@ -264,51 +264,50 @@
{
$detected .= lang('Found existing configuration file. Loading settings from the file...') . '
' . "\n";
$GLOBALS['phpgw_info']['flags']['noapi'] = True;
- include('../header.inc.php');
$no_guess = true;
/* This code makes sure the newer multi-domain supporting header.inc.php is being used */
- if(!isset($phpgw_domain))
+ if(!isset($GLOBALS['phpgw_domain']))
{
$detected .= lang("You're using an old configuration file format...") . '
' . "\n";
$detected .= lang('Importing old settings into the new format....') . '
' . "\n";
}
else
{
- if($GLOBALS['phpgw_info']['server']['header_version'] != $GLOBALS['phpgw_info']['server']['current_header_version'])
+ if(@$GLOBALS['phpgw_info']['server']['header_version'] != @$GLOBALS['phpgw_info']['server']['current_header_version'])
{
$detected .= lang("You're using an old header.inc.php version...") . '
' . "\n";
$detected .= lang('Importing old settings into the new format....') . '
' . "\n";
}
- reset($phpgw_domain);
- $default_domain = each($phpgw_domain);
+ reset($GLOBALS['phpgw_domain']);
+ $default_domain = each($GLOBALS['phpgw_domain']);
$GLOBALS['phpgw_info']['server']['default_domain'] = $default_domain[0];
unset($default_domain); // we kill this for security reasons
- $GLOBALS['phpgw_info']['server']['config_passwd'] = $phpgw_domain[$GLOBALS['phpgw_info']['server']['default_domain']]['config_passwd'];
+ $GLOBALS['phpgw_info']['server']['config_passwd'] = $GLOBALS['phpgw_domain'][$GLOBALS['phpgw_info']['server']['default_domain']]['config_passwd'];
- if($GLOBALS['HTTP_POST_VARS']['adddomain'])
+ if(@$GLOBALS['HTTP_POST_VARS']['adddomain'])
{
- $phpgw_domain[lang('new')] = array();
+ $GLOBALS['phpgw_domain'][lang('new')] = array();
}
- reset($phpgw_domain);
- while(list($key,$val) = each($phpgw_domain))
+ reset($GLOBALS['phpgw_domain']);
+ while(list($key,$val) = each($GLOBALS['phpgw_domain']))
{
$setup_tpl->set_var('lang_domain',lang('Domain'));
$setup_tpl->set_var('lang_delete',lang('Delete'));
$setup_tpl->set_var('db_domain',$key);
- $setup_tpl->set_var('db_host',$phpgw_domain[$key]['db_host']);
- $setup_tpl->set_var('db_name',$phpgw_domain[$key]['db_name']);
- $setup_tpl->set_var('db_user',$phpgw_domain[$key]['db_user']);
- $setup_tpl->set_var('db_pass',$phpgw_domain[$key]['db_pass']);
- $setup_tpl->set_var('db_type',$phpgw_domain[$key]['db_type']);
- $setup_tpl->set_var('config_pass',$phpgw_domain[$key]['config_passwd']);
+ $setup_tpl->set_var('db_host',$GLOBALS['phpgw_domain'][$key]['db_host']);
+ $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']);
+ $setup_tpl->set_var('db_type',$GLOBALS['phpgw_domain'][$key]['db_type']);
+ $setup_tpl->set_var('config_pass',$GLOBALS['phpgw_domain'][$key]['config_passwd']);
$selected = '';
- $db_type_option = '';
+ $dbtype_options = '';
$found_dbtype = False;
while(list($k,$v) = each($supported_db))
{
- if($v == $phpgw_domain[$key]['db_type'])
+ if($v == $GLOBALS['phpgw_domain'][$key]['db_type'])
{
$selected = ' selected ';
$found_dbtype = true;
@@ -317,11 +316,11 @@
{
$selected = '';
}
- $dbtype_options .= '