Fixed broken import function (fixes #38)

This commit is contained in:
Matthias 2015-04-22 13:31:10 +02:00
parent 642524d391
commit da750a8092

View File

@ -897,21 +897,7 @@ EOSQL;
$vcal->SetComponents($resource); $vcal->SetComponents($resource);
$icalendar = $vcal->Render(); $icalendar = $vcal->Render();
$dav_name = sprintf( '%s%s.ics', $path, preg_replace('{[&?\\/@%+:]}','',$uid) ); $dav_name = sprintf( '%s%s.ics', $path, preg_replace('{[&?\\/@%+:]}','',$uid) );
/** Do we need to do anything? */
$inserting = true;
if ( isset($current_data[$dav_name]) ) {
if ( $icalendar == $current_data[$dav_name] ) {
unset($current_data[$dav_name]);
continue;
}
$sync_change = 200;
unset($current_data[$dav_name]);
$inserting = false;
}
else
$sync_change = 201;
if ( isset($c->skip_bad_event_on_import) && $c->skip_bad_event_on_import ) $qry->Begin(); if ( isset($c->skip_bad_event_on_import) && $c->skip_bad_event_on_import ) $qry->Begin();
/** As ever, we mostly deal with the first resource component */ /** As ever, we mostly deal with the first resource component */