diff --git a/src/Resources/contao/dca/tl_calendar_events.php b/src/Resources/contao/dca/tl_calendar_events.php index dbb9b7f999..7e39f97b60 100644 --- a/src/Resources/contao/dca/tl_calendar_events.php +++ b/src/Resources/contao/dca/tl_calendar_events.php @@ -904,18 +904,19 @@ public function generateFeed() * modified (edit/editAll), moved (cut/cutAll) or deleted (delete/deleteAll). * Since duplicated events are unpublished by default, it is not necessary * to schedule updates on copyAll as well. + * @param \DataContainer */ - public function scheduleUpdate() + public function scheduleUpdate(DataContainer $dc) { // Return if there is no ID - if (!CURRENT_ID || Input::get('act') == 'copy') + if (!$dc->activeRecord || !$dc->activeRecord->pid || Input::get('act') == 'copy') { return; } // Store the ID in the session $session = $this->Session->get('calendar_feed_updater'); - $session[] = CURRENT_ID; + $session[] = $dc->activeRecord->pid; $this->Session->set('calendar_feed_updater', array_unique($session)); }