From: jitendrapurohit Date: Thu, 28 May 2015 11:45:20 +0000 (+0530) Subject: CRM-16568 - Repeating Events: excluding dates doesn't stop the event from being created X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=1d9e2fcbcb1072e9673aa26e777e2bcce64535e6;p=civicrm-core.git CRM-16568 - Repeating Events: excluding dates doesn't stop the event from being created --- diff --git a/CRM/Event/Form/ManageEvent/Repeat.php b/CRM/Event/Form/ManageEvent/Repeat.php index 02c79fbcdf..f031f006e0 100644 --- a/CRM/Event/Form/ManageEvent/Repeat.php +++ b/CRM/Event/Form/ManageEvent/Repeat.php @@ -102,6 +102,10 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent { $params['excludeDateRangeColumns'] = array('start_date', 'end_date'); $params['entity_table'] = 'civicrm_event'; $params['entity_id'] = $this->_id; + + // CRM-16568 - check if parent exist for the event. + $parentId = CRM_Core_BAO_RecurringEntity::getParentFor($this->_id, 'civicrm_event'); + $params['parent_entity_id'] = !empty($parentId) ? $parentId : $params['entity_id']; //Unset event id unset($params['id']);