fix for bug [ 1448778 ] failed to open stream: No such file or directory

--> quitend error message if using localhost and no holidays are availible for a country
This commit is contained in:
Ralf Becker 2006-03-15 06:42:26 +00:00
parent 60aed02c8c
commit 4d8837f848

View File

@ -288,7 +288,7 @@
// echo 'Loading from: '.$load_from.'/holidays.'.strtoupper($locale).'.csv'."<br>\n"; // echo 'Loading from: '.$load_from.'/holidays.'.strtoupper($locale).'.csv'."<br>\n";
if($GLOBALS['egw_info']['server']['holidays_url_path'] == 'localhost') if($GLOBALS['egw_info']['server']['holidays_url_path'] == 'localhost')
{ {
$lines = file(EGW_SERVER_ROOT.'/calendar/egroupware.org/holidays.'.strtoupper($locale).'.csv'); $lines = @file(EGW_SERVER_ROOT.'/calendar/egroupware.org/holidays.'.strtoupper($locale).'.csv');
} }
else else
$lines = $network->gethttpsocketfile($load_from.'/holidays.'.strtoupper($locale).'.csv'); $lines = $network->gethttpsocketfile($load_from.'/holidays.'.strtoupper($locale).'.csv');