Extra checking to see if the holiday calculator is found. If not, just load the US caluclator.

This commit is contained in:
skeeter 2001-06-24 22:19:06 +00:00
parent 9ba26f9b58
commit 0b01efd74f

View File

@ -22,5 +22,13 @@
$rule = $phpgw_info['user']['preferences']['common']['country'];
}
include(PHPGW_INCLUDE_ROOT.'/calendar/inc/class.holidaycalc_'.$rule.'.inc.php');
$calc_include = PHPGW_INCLUDE_ROOT.'/calendar/inc/class.holidaycalc_'.$rule.'.inc.php';
if(@file_exists($calc_include))
{
include($calc_include);
}
else
{
include(PHPGW_INCLUDE_ROOT.'/calendar/inc/class.holidaycalc_US.inc.php');
}
?>