some notice fixes
authordeepak-srivastava <deepak.srivastava.0303@gmail.com>
Fri, 3 Oct 2014 10:03:19 +0000 (11:03 +0100)
committerdeepak-srivastava <deepak.srivastava.0303@gmail.com>
Fri, 3 Oct 2014 10:03:19 +0000 (11:03 +0100)
CRM/Core/DAO/RecurringEntity.php
CRM/Event/Form/ManageEvent/Repeat.php

index 812464bba3938425e7d0e10c9e7828718749f4fe..37fc371eaf3ea5f3331e7aba6a81571333062661 100644 (file)
@@ -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
    */
index 58b1245357ae36fb923bdfe783c71873c274e6b6..a0b9d4bee7f51ff51a3736ff1169a7f687de3802 100644 (file)
@@ -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;
       }