forked from extern/egroupware
small fix to be able to upgrade a pre 1.2 header
This commit is contained in:
parent
ef69e29a99
commit
408a951b23
@ -149,7 +149,7 @@ class setup_header
|
||||
/**
|
||||
* generate header.inc.php file from given values
|
||||
*
|
||||
* setup_header::generate(EGW_SERVER_ROOT,EGW_INCLUDE_ROOT,$GLOBALS['egw_info'],$GLOBALS['egw_domains'])
|
||||
* setup_header::generate($GLOBALS['egw_info'],$GLOBALS['egw_domains'])
|
||||
* should write an identical header.inc.php as the one include
|
||||
*
|
||||
* @param array $egw_info usual content (in server key) plus keys server_root and include_root
|
||||
|
@ -35,11 +35,18 @@
|
||||
/* If we included the header.inc.php, but it is somehow broken, cover ourselves... */
|
||||
if(!defined('EGW_SERVER_ROOT') && !defined('EGW_INCLUDE_ROOT'))
|
||||
{
|
||||
define('EGW_SERVER_ROOT','..');
|
||||
define('EGW_INCLUDE_ROOT','..');
|
||||
define('PHPGW_SERVER_ROOT','..');
|
||||
define('PHPGW_INCLUDE_ROOT','..');
|
||||
|
||||
if (defined('PHPGW_SERVER_ROOT') && defined('PHPGW_INCLUDE_ROOT')) // pre 1.2 install
|
||||
{
|
||||
define('EGW_SERVER_ROOT',PHPGW_SERVER_ROOT);
|
||||
define('EGW_INCLUDE_ROOT',PHPGW_INCLUDE_ROOT);
|
||||
}
|
||||
else // no install
|
||||
{
|
||||
define('EGW_SERVER_ROOT','..');
|
||||
define('EGW_INCLUDE_ROOT','..');
|
||||
define('PHPGW_SERVER_ROOT','..');
|
||||
define('PHPGW_INCLUDE_ROOT','..');
|
||||
}
|
||||
define('EGW_API_INC',EGW_SERVER_ROOT.'/phpgwapi/inc');
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ switch($action)
|
||||
case '--create-header':
|
||||
case '--edit-header':
|
||||
case '--upgrade-header':
|
||||
case '--update-header':
|
||||
do_header($action == '--create-header',$arguments);
|
||||
break;
|
||||
|
||||
@ -535,7 +536,7 @@ function do_check($domain='',$stop=0)
|
||||
echo lang("database is version %1 and up to date.",$setup_info['phpgwapi']['currentver'])."\n";
|
||||
|
||||
$GLOBALS['egw_setup']->detection->check_config();
|
||||
if ($GLOBALS['egw_info']['setup']['config_errors'] && !in_array(15,$stop))
|
||||
if ($GLOBALS['egw_info']['setup']['config_errors'] && $stop && !in_array(15,$stop))
|
||||
{
|
||||
fail(15,lang('You need to configure eGroupWare:')."\n- ".@implode("\n- ",$GLOBALS['egw_info']['setup']['config_errors']));
|
||||
}
|
||||
@ -705,8 +706,7 @@ function do_header($create,&$arguments)
|
||||
echo "\n".lang('Configuration errors:')."\n- ".implode("\n- ",$errors)."\n";
|
||||
fail(23,lang("You need to fix the above errors, before the configuration file header.inc.php can be written!"));
|
||||
}
|
||||
$header = $GLOBALS['egw_setup']->header->generate($GLOBALS['egw_info'],$GLOBALS['egw_domain'],
|
||||
$GLOBALS['egw_info']['server']['server_root'],$GLOBALS['egw_info']['server']['include_root']);
|
||||
$header = $GLOBALS['egw_setup']->header->generate($GLOBALS['egw_info'],$GLOBALS['egw_domain']);
|
||||
|
||||
echo $header;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user