From fc1ad9c3bf01eebe7144e8c4473bc652ff2fcdeb Mon Sep 17 00:00:00 2001 From: deepak-srivastava Date: Fri, 3 Oct 2014 11:03:19 +0100 Subject: [PATCH] some notice fixes --- CRM/Core/DAO/RecurringEntity.php | 4 ++++ CRM/Event/Form/ManageEvent/Repeat.php | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CRM/Core/DAO/RecurringEntity.php b/CRM/Core/DAO/RecurringEntity.php index 812464bba3..37fc371eaf 100644 --- a/CRM/Core/DAO/RecurringEntity.php +++ b/CRM/Core/DAO/RecurringEntity.php @@ -94,21 +94,25 @@ class CRM_Core_DAO_RecurringEntity extends CRM_Core_DAO */ public $id; /** + * Recurring Entity Parent ID * * @var int unsigned */ public $parent_id; /** + * Recurring Entity Child ID * * @var int unsigned */ public $entity_id; /** + * Physical tablename for entity, e.g. civicrm_event * * @var string */ public $entity_table; /** + * 1-this entity, 2-this and the following entities, 3-all the entities * * @var boolean */ diff --git a/CRM/Event/Form/ManageEvent/Repeat.php b/CRM/Event/Form/ManageEvent/Repeat.php index 58b1245357..a0b9d4bee7 100644 --- a/CRM/Event/Form/ManageEvent/Repeat.php +++ b/CRM/Event/Form/ManageEvent/Repeat.php @@ -94,9 +94,12 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent { $this->_scheduleReminderDetails = self::getReminderDetailsByEventId($this->_id, 'event'); $this->_parentEventId = $this->_id; } + //Assign this to hide summary - $this->assign('scheduleReminderId', $this->_scheduleReminderDetails->id); - + if (property_exists($this->_scheduleReminderDetails, 'id')) { + $this->assign('scheduleReminderId', $this->_scheduleReminderDetails->id); + } + $parentEventParams = array('id' => $this->_id); $parentEventValues = array(); $parentEventReturnProperties = array('start_date', 'end_date'); @@ -128,7 +131,9 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent { $defaults = array(); //Set Schedule Reminder Id - $this->_scheduleReminderId = $this->_scheduleReminderDetails->id; + if (property_exists($this->_scheduleReminderDetails, 'id')) { + $this->_scheduleReminderId = $this->_scheduleReminderDetails->id; + } //Always pass current event's start date by default $currentEventStartDate = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $this->_id, 'start_date', 'id'); list($defaults['repetition_start_date'], $defaults['repetition_start_date_time']) = CRM_Utils_Date::setDateDefaults($currentEventStartDate, 'activityDateTime'); @@ -156,9 +161,11 @@ class CRM_Event_Form_ManageEvent_Repeat extends CRM_Event_Form_ManageEvent { $defaults['repeats_by'] = 1; } $explodeStartActionCondition = array(); - $explodeStartActionCondition = explode(" ", $this->_scheduleReminderDetails->entity_status); - $defaults['entity_status_1'] = $explodeStartActionCondition[0]; - $defaults['entity_status_2'] = $explodeStartActionCondition[1]; + if ($this->_scheduleReminderDetails->entity_status) { + $explodeStartActionCondition = explode(" ", $this->_scheduleReminderDetails->entity_status); + $defaults['entity_status_1'] = $explodeStartActionCondition[0]; + $defaults['entity_status_2'] = $explodeStartActionCondition[1]; + } if($this->_scheduleReminderDetails->entity_status){ $defaults['repeats_by'] = 2; } -- 2.25.1