fixed some probs with not existing database

This commit is contained in:
Ralf Becker 2003-08-28 18:14:45 +00:00
parent b90c3e5f47
commit 55638ce3a5
2 changed files with 10 additions and 1 deletions

View File

@ -122,7 +122,7 @@
elseif(!empty($ConfigLogin) && $auth_type == 'Config')
{
/* config login */
if($FormPW == stripslashes(@$GLOBALS['phpgw_domain'][$FormDomain]['config_passwd']))
if(isset($GLOBALS['phpgw_domain'][$FormDomain]) && $FormPW == stripslashes(@$GLOBALS['phpgw_domain'][$FormDomain]['config_passwd']))
{
setcookie('ConfigPW',"$FormPW","$expire");
setcookie('ConfigDomain',"$FormDomain","$expire");

View File

@ -252,6 +252,15 @@
$GLOBALS['phpgw_setup']->db->Halt_On_Error = 'no';
// _debug_array($setup_info);
if (!$GLOBALS['phpgw_setup']->db->Link_ID)
{
$GLOBALS['phpgw_setup']->db->connect();
}
if (!$GLOBALS['phpgw_setup']->db->Link_ID)
{
$GLOBALS['phpgw_info']['setup']['header_msg'] = 'Stage 1 (Create Database)';
return 1;
}
if(!isset($setup_info['phpgwapi']['currentver']))
{
$setup_info = $this->get_db_versions($setup_info);