forked from extern/egroupware
Add another case for manageheader when domains are not defined in header.inc.php, also some formatting updates
This commit is contained in:
parent
b6578a3c3d
commit
4b4afd3c23
@ -229,20 +229,20 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($GLOBALS['phpgw_info']['server']['header_admin_password']))
|
||||
if(!@isset($GLOBALS['phpgw_info']['server']['header_admin_password']))
|
||||
{
|
||||
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (No header admin password set)';
|
||||
return '2';
|
||||
}
|
||||
elseif (!isset($GLOBALS['phpgw_domain']))
|
||||
elseif(!@isset($GLOBALS['phpgw_domain']))
|
||||
{
|
||||
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (Upgrade your header.inc.php)';
|
||||
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (Add domains to your header.inc.php)';
|
||||
return '3';
|
||||
}
|
||||
elseif(@$GLOBALS['phpgw_info']['server']['versions']['header'] != @$GLOBALS['phpgw_info']['server']['versions']['current_header'])
|
||||
{
|
||||
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage One (Upgrade your header.inc.php)';
|
||||
return '3';
|
||||
return '4';
|
||||
}
|
||||
}
|
||||
/* header.inc.php part settled. Moving to authentication */
|
||||
|
@ -75,7 +75,8 @@
|
||||
function show_header($title='',$nologoutbutton=False, $logoutfrom='config', $configdomain='')
|
||||
{
|
||||
$GLOBALS['setup_tpl']->set_var('lang_charset',lang('charset'));
|
||||
$style = array('th_bg' => '#486591',
|
||||
$style = array(
|
||||
'th_bg' => '#486591',
|
||||
'th_text' => '#FFFFFF',
|
||||
'row_on' => '#DDDDDD',
|
||||
'row_off' => '#EEEEEE',
|
||||
|
@ -374,6 +374,7 @@ you have not created your header.inc.php yet!<br> you can create it now. setup e
|
||||
you have successfully logged out setup en You have successfully logged out
|
||||
you must enter a username for the admin setup en You must enter a username for the admin
|
||||
you need to select your current charset! setup en You need to select your current charset!
|
||||
you need to add some domains to your header.inc.php. setup en You need to add some domains to your header.inc.php.
|
||||
you should either uninstall and then reinstall it, or attempt manual repairs setup en You should either uninstall and then reinstall it, or attempt manual repairs
|
||||
you're using an old configuration file format... setup en You're using an old configuration file format...
|
||||
you're using an old header.inc.php version... setup en You're using an old header.inc.php version...
|
||||
|
@ -96,6 +96,18 @@
|
||||
$GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header admin password is NOT set. Please set it now!');
|
||||
break;
|
||||
case '3':
|
||||
$GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('You need to add some domains to your header.inc.php.');
|
||||
$GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('You need to add some domains to your header.inc.php.');
|
||||
$GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('You need to add some domains to your header.inc.php.');
|
||||
if(!$GLOBALS['phpgw_setup']->auth('Header'))
|
||||
{
|
||||
$GLOBALS['phpgw_setup']->html->show_header('Please login',True);
|
||||
$GLOBALS['phpgw_setup']->html->login_form();
|
||||
$GLOBALS['phpgw_setup']->html->show_footer();
|
||||
exit;
|
||||
}
|
||||
break;
|
||||
case '4':
|
||||
$GLOBALS['phpgw_info']['setup']['HeaderFormMSG'] = lang('Your header.inc.php needs upgrading.');
|
||||
$GLOBALS['phpgw_info']['setup']['PageMSG'] = lang('Your header.inc.php needs upgrading.<br><blink><b class="msg">WARNING!</b></blink><br><b>MAKE BACKUPS!</b>');
|
||||
$GLOBALS['phpgw_info']['setup']['HeaderLoginMSG'] = lang('Your header.inc.php needs upgrading.');
|
||||
@ -292,8 +304,32 @@
|
||||
/* This code makes sure the newer multi-domain supporting header.inc.php is being used */
|
||||
if(!isset($GLOBALS['phpgw_domain']))
|
||||
{
|
||||
$detected .= lang("You're using an old configuration file format...") . '<br>' . "\n";
|
||||
$detected .= lang('Importing old settings into the new format....') . '<br>' . "\n";
|
||||
$detected .= lang('You need to add some domains to your header.inc.php.') . '<br>' . "\n";
|
||||
$GLOBALS['phpgw_domain']['default'] = array();
|
||||
$setup_tpl->set_var('lang_domain',lang('Domain'));
|
||||
$setup_tpl->set_var('lang_delete',lang('Delete'));
|
||||
$setup_tpl->set_var('db_domain','default');
|
||||
$setup_tpl->set_var('db_host','localhost');
|
||||
$setup_tpl->set_var('db_name','egroupware');
|
||||
$setup_tpl->set_var('db_user','egroupware');
|
||||
$setup_tpl->set_var('db_pass','your_password');
|
||||
$setup_tpl->set_var('db_type','mysql');
|
||||
$setup_tpl->set_var('config_pass','changeme');
|
||||
while(list($k,$v) = @each($supported_db))
|
||||
{
|
||||
if($v == $GLOBALS['phpgw_domain'][$key]['db_type'])
|
||||
{
|
||||
$selected = ' selected ';
|
||||
$found_dbtype = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$selected = '';
|
||||
}
|
||||
$dbtype_options .= '<option ' . $selected . 'value="' . $v . '">' . $v . "\n";
|
||||
}
|
||||
$setup_tpl->set_var('dbtype_options',$dbtype_options);
|
||||
$setup_tpl->parse('domains','domain',True);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -351,8 +387,10 @@
|
||||
}
|
||||
if(defined('PHPGW_SERVER_ROOT'))
|
||||
{
|
||||
$GLOBALS['phpgw_info']['server']['server_root'] = PHPGW_SERVER_ROOT;
|
||||
$GLOBALS['phpgw_info']['server']['include_root'] = PHPGW_INCLUDE_ROOT;
|
||||
$GLOBALS['phpgw_info']['server']['server_root'] = PHPGW_SERVER_ROOT == '..'
|
||||
? '/path/to/egroupware' : PHPGW_SERVER_ROOT;
|
||||
$GLOBALS['phpgw_info']['server']['include_root'] = PHPGW_INCLUDE_ROOT == '..'
|
||||
? '/path/to/egroupware' : PHPGW_INCLUDE_ROOT;
|
||||
}
|
||||
elseif(!@isset($GLOBALS['phpgw_info']['server']['include_root']) && @$GLOBALS['phpgw_info']['server']['header_version'] <= 1.6)
|
||||
{
|
||||
@ -542,7 +580,6 @@
|
||||
$setup_tpl->set_var('lang_finaldescr',lang('After retrieving the file, put it into place as the header.inc.php. Then, click "continue".'));
|
||||
$setup_tpl->set_var('lang_continue',lang('Continue'));
|
||||
|
||||
|
||||
$setup_tpl->pfp('out','manageheader');
|
||||
|
||||
$GLOBALS['phpgw_setup']->html->show_footer();
|
||||
@ -550,4 +587,3 @@
|
||||
break; // ending the switch default
|
||||
}
|
||||
?>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user