*@throwsegw_exception_no_permission(lang('Access denied: wrong username or password for manage-header !!!'),21);
*@throwsegw_exception_no_permission(lang("Access denied: wrong username or password to configure the domain '%1(%2)' !!!",$domain,$GLOBALS['egw_domain'][$domain]['db_type']),40);
thrownewegw_exception_no_permission(lang('Access denied: wrong username or password for manage-header !!!'),21);
}
else
{
thrownewegw_exception_no_permission(lang("Access denied: wrong username or password to configure the domain '%1(%2)' !!!",$domain,$GLOBALS['egw_domain'][$domain]['db_type']),40);
thrownewegw_exception_wrong_userinput(lang("eGroupWare sources in '%1' are not complete, file '%2' missing !!!",realpath('..'),'phpgwapi/setup/setup.inc.php'),99);// should not happen ;-)
case1:thrownewegw_exception_wrong_userinput(lang('eGroupWare configuration file (header.inc.php) does NOT exist.')."\n".lang('Use --create-header to create the configuration file (--usage gives more options).'),1);
case2:thrownewegw_exception_wrong_userinput(lang('eGroupWare configuration file (header.inc.php) version %1 exists%2',$versions['header'],'.')."\n".lang('No header admin password set! Use --edit-header <password>[,<user>] to set one (--usage gives more options).'),2);
case3:thrownewegw_exception_wrong_userinput(lang('eGroupWare configuration file (header.inc.php) version %1 exists%2',$versions['header'],'.')."\n".lang('No eGroupWare domains / database instances exist! Use --edit-header --domain to add one (--usage gives more options).'),3);
case4:thrownewegw_exception_wrong_userinput(lang('eGroupWare configuration file (header.inc.php) version %1 exists%2',$versions['header'],'.')."\n".lang('It needs upgrading to version %1! Use --update-header <password>[,<user>] to do so (--usage gives more options).',$versions['current_header']),4);
}
if($header_checks)
{
$messages[]=self::_echo_message($verbose,lang('eGroupWare configuration file (header.inc.php) version %1 exists%2',
$versions['header'],' '.lang('and is up to date')));
}
$header_checks=false;// no further output of the header checks
$domains=$GLOBALS['egw_domain'];
if($domain)// domain to check given
{
if(!isset($GLOBALS['egw_domain'][$domain]))thrownewegw_exception_wrong_userinput(lang("Domain '%1' does NOT exist !!!",$domain));
case1:thrownewegw_exception_wrong_userinput(lang('Your Database is not working!')."$db: ".self::$egw_setup->db->Error,11);
case3:thrownewegw_exception_wrong_userinput(lang('Your database is working, but you dont have any applications installed')." ($db). ".lang("Use --install to install eGroupWare."),13);
case4:thrownewegw_exception_wrong_userinput(lang('eGroupWare API needs a database (schema) update from version %1 to %2!',$setup_info['phpgwapi']['currentver'],$versions['phpgwapi']).' '.lang('Use --update to do so.'),14);
thrownewegw_exception_wrong_userinput(lang('The following applications need to be upgraded:').' '.implode(', ',$apps_to_upgrade).'! '.lang('Use --update to do so.'),14);
}
break;
}
$messages[]=self::_echo_message($verbose,lang("database is version %1 and up to date.",$setup_info['phpgwapi']['currentver']));
thrownewegw_exception_wrong_userinput(lang('You need to configure eGroupWare:')."\n- ".@implode("\n- ",$GLOBALS['egw_info']['setup']['config_errors']),15);