For not error Undefined property: stdClass::$MAIN_AGENDA_EXPORT_CACHE

This commit is contained in:
tysauron
2015-09-23 01:24:30 +02:00
parent f81df66564
commit f8f50b3071

View File

@@ -59,12 +59,14 @@ function build_calfile($format,$title,$desc,$events_array,$outputfile)
fwrite($calfileh,"CALSCALE:GREGORIAN\n");
fwrite($calfileh,"X-WR-CALNAME:".$encoding.format_cal($format,$title)."\n");
fwrite($calfileh,"X-WR-CALDESC:".$encoding.format_cal($format,$desc)."\n");
$hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'hour');
$mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'min');
$ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'sec');
//fwrite($calfileh,"X-WR-TIMEZONE:Europe/Paris\n");
if (! empty($conf->global->MAIN_AGENDA_EXPORT_CACHE)
&& $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60) fwrite($calfileh,"X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n");
&& $conf->global->MAIN_AGENDA_EXPORT_CACHE > 60){
$hh=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'hour');
$mm=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'min');
$ss=convertSecondToTime($conf->global->MAIN_AGENDA_EXPORT_CACHE,'sec');
fwrite($calfileh,"X-PUBLISHED-TTL: P".$hh."H".$mm."M".$ss."S\n");
}
foreach ($events_array as $date => $event)
{