Skip to content

Commit

Permalink
Fixed bug in calendar import which did not delete old tl_content entries
Browse files Browse the repository at this point in the history
  • Loading branch information
hschottm committed Feb 1, 2016
1 parent 2a0f813 commit 05a6e8f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions classes/CalendarImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@ protected function importFromCSVFile($prepare = true)
{
while ($event->next())
{
$content = \ContentModel::findBy(array('ptable','pid'),array('tl_calendar_events',$event->id));
$arrColumns = array("ptable=? AND pid=?");
$arrValues = array('tl_calendar_events',$event->id);
$content = \ContentModel::findBy($arrColumns,$arrValues);
if ($content)
{
while ($content->next())
Expand Down Expand Up @@ -693,7 +695,9 @@ protected function importFromICS($pid, $startDate, $endDate, $correctTimezone =
{
while ($event->next())
{
$content = \ContentModel::findBy(array('ptable','pid'),array('tl_calendar_events',$event->id));
$arrColumns = array("ptable=? AND pid=?");
$arrValues = array('tl_calendar_events',$event->id);
$content = \ContentModel::findBy($arrColumns,$arrValues);
if ($content)
{
while ($content->next())
Expand Down

0 comments on commit 05a6e8f

Please sign in to comment.