If PHP_SELF is not set, a REG_EMPTY error is generated - there is probably a better fix...

This commit is contained in:
Miles Lott 2002-08-24 15:22:14 +00:00
parent 24d9c7546c
commit 2808bec6c5

View File

@ -176,12 +176,12 @@
}
$GLOBALS['phpgw']->db->Halt_On_Error = 'no';
@$GLOBALS['phpgw']->db->query("select count(config_name) from phpgw_config");
if (! @$GLOBALS['phpgw']->db->next_record())
@$GLOBALS['phpgw']->db->query("SELECT COUNT(config_name) FROM phpgw_config");
if(!@$GLOBALS['phpgw']->db->next_record())
{
$setup_dir = ereg_replace($PHP_SELF,'index.php','setup/');
$setup_dir = @ereg_replace($PHP_SELF,'index.php','setup/');
echo '<center><b>Fatal Error:</b> It appears that you have not created the database tables for '
.'phpGroupWare. Click <a href="' . $setup_dir . '">here</a> to run setup.</center>';
.'phpGroupWare. Click <a href="' . $setup_dir . '">here</a> to run setup.</center>';
exit;
}
$GLOBALS['phpgw']->db->Halt_On_Error = 'yes';