Fix: ical export can works if there is two parallele calls

This commit is contained in:
Laurent Destailleur 2010-01-17 21:22:14 +00:00
parent cd7a810f53
commit 0ba70794df

View File

@ -76,7 +76,7 @@ if (empty($_GET["exportkey"]) || $conf->global->MAIN_AGENDA_XCAL_EXPORTKEY != $_
exit;
}
// Define filename
// Define filename with prefix on filters predica (each predica set must have on cache file)
$filename='';
if ($format == 'vcal') $filename='dolibarrcalendar.vcs';
if ($format == 'ical') $filename='dolibarrcalendar.ics';
@ -91,6 +91,15 @@ if (! $filename)
llxFooterVierge('$Date$ - $Revision$');
exit;
}
foreach ($filters as $key => $value)
{
if ($key == 'year') $filename.='.year'.$value;
if ($key == 'idaction') $filename.='.id'.$value;
if ($key == 'login') $filename.='.login'.$value;
if ($key == 'logina') $filename.='.logina'.$value;
if ($key == 'logind') $filename.='.logind'.$value;
if ($key == 'logint') $filename.='.logint'.$value;
}
$agenda=new ActionComm($db);