diff --git a/setup/inc/class.setup_html.inc.php b/setup/inc/class.setup_html.inc.php
index 391b33cfaf..58a99886f1 100644
--- a/setup/inc/class.setup_html.inc.php
+++ b/setup/inc/class.setup_html.inc.php
@@ -19,14 +19,14 @@
*/
function generate_header()
{
- global $setting, $phpgw_setup, $phpgw_info, $header_template;
+ $setting = $GLOBALS['HTTP_POST_VARS']['setting'];
- $header_template->set_file(array('header' => 'header.inc.php.template'));
- while(list($k,$v) = each($setting))
+ $GLOBALS['header_template']->set_file(array('header' => 'header.inc.php.template'));
+ while(list($k,$v) = @each($setting))
{
- $header_template->set_var(strtoupper($k),$v);
+ $GLOBALS['header_template']->set_var(strtoupper($k),$v);
}
- return $header_template->parse('out','header');
+ return $GLOBALS['header_template']->parse('out','header');
}
function setup_tpl_dir($app_name='setup')
diff --git a/setup/manageheader.php b/setup/manageheader.php
index ff5cdd2f4f..1372a3f4eb 100644
--- a/setup/manageheader.php
+++ b/setup/manageheader.php
@@ -26,20 +26,18 @@
function check_form_values()
{
- global $setting, $phpgw_setup;
-
- if (! $setting['config_pass'])
+ if (! $GLOBALS['HTTP_POST_VARS']['setting']['config_pass'])
{
$errors .= "
You didn't enter a config password";
}
- if (! $setting['HEADER_ADMIN_PASSWORD'])
+ if (! $GLOBALS['HTTP_POST_VARS']['setting']['HEADER_ADMIN_PASSWORD'])
{
$errors .= "
You didn't enter a header admin password";
}
if ($errors)
{
- $phpgw_setup->show_header('Error',True);
+ $GLOBALS['phpgw_setup']->show_header('Error',True);
echo $errors;
exit;
}
@@ -96,11 +94,11 @@
break;
}
- switch($action)
+ switch($HTTP_POST_VARS['action'])
{
case 'download':
check_form_values();
- $header_template = new Template('../');
+ $header_template = CreateObject('phpgwapi.Template','../');
header('Content-disposition: attachment; filename="header.inc.php"');
header('Content-type: application/octet-stream');
header('Pragma: no-cache');
@@ -110,7 +108,7 @@
break;
case 'view':
check_form_values();
- $header_template = new Template('../');
+ $header_template = CreateObject('phpgwapi.Template','../');
$phpgw_setup->show_header('Generated header.inc.php', False, 'header');
echo '
Save this text as contents of your header.inc.php