* Calendar/ImportExport: fixed out-of-memory condition while importing large iCal files

do NOT read whole file into memory, just pass stream so iCal class can use an iterator
This commit is contained in:
Ralf Becker 2013-03-14 15:41:38 +00:00
parent 166335f16e
commit d0428594a1
2 changed files with 3 additions and 3 deletions

View File

@ -1058,7 +1058,7 @@ class calendar_ical extends calendar_boupdate
/**
* Import an iCal
*
* @param string $_vcalData
* @param string|resource $_vcalData
* @param int $cal_id=-1 must be -1 for new entries!
* @param string $etag=null if an etag is given, it has to match the current etag or the import will fail
* @param boolean $merge=false merge data with existing entry

View File

@ -131,7 +131,7 @@ class calendar_import_ical implements importexport_iface_import_plugin {
echo lang("No preview for iCal");
return;
}
if (!$calendar_ical->importVCal(stream_get_contents($_stream), -1,null,false,0,'',null,null,null,$_definition->plugin_options['no_notification']))
if (!$calendar_ical->importVCal($_stream, -1,null,false,0,'',null,null,null,$_definition->plugin_options['no_notification']))
{
$this->errors[] = lang('Error: importing the iCal');
}
@ -143,7 +143,7 @@ class calendar_import_ical implements importexport_iface_import_plugin {
return $calendar_ical->events_imported;
}
/**
* returns translated name of plugin
*