From 0b01efd74fa5e6ec67f561ca73ecb375f6b01f5b Mon Sep 17 00:00:00 2001 From: skeeter Date: Sun, 24 Jun 2001 22:19:06 +0000 Subject: [PATCH] Extra checking to see if the holiday calculator is found. If not, just load the US caluclator. --- calendar/inc/class.holidaycalc.inc.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.holidaycalc.inc.php b/calendar/inc/class.holidaycalc.inc.php index 4186374919..8311f3c53e 100755 --- a/calendar/inc/class.holidaycalc.inc.php +++ b/calendar/inc/class.holidaycalc.inc.php @@ -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'); + } ?>