Fix scrutinizer errors
This commit is contained in:
parent
01e60562b9
commit
716777f364
@ -109,14 +109,10 @@ if ($rss) {
|
|||||||
|
|
||||||
dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG);
|
dol_syslog("build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG);
|
||||||
|
|
||||||
// Check parameters
|
|
||||||
if (empty($format)) return -1;
|
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
if (!$filename)
|
if (!$filename)
|
||||||
{
|
{
|
||||||
$extension = 'vcs';
|
$extension = 'rss';
|
||||||
if ($format == 'ical') $extension = 'ics';
|
|
||||||
$filename = $format.'.'.$extension;
|
$filename = $format.'.'.$extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,9 +144,7 @@ if ($rss) {
|
|||||||
@chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK));
|
@chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
// Write file
|
// Write file
|
||||||
//if ($format == 'vcal') $result=build_calfile($format, $title, $desc, $eventarray, $outputfiletmp);
|
$result=build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp);
|
||||||
//elseif ($format == 'ical') $result=build_calfile($format, $title, $desc, $eventarray, $outputfiletmp);
|
|
||||||
if ($format == 'rss') $result=build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp);
|
|
||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user