From 4a3c98135341251abb2e3e7a0f7644b9b4c8e56e Mon Sep 17 00:00:00 2001 From: Anthony Nemirovsky Date: Mon, 23 Mar 2015 18:00:54 -0700 Subject: [PATCH] Fix conference slot does not seem to save parent item. CRM-16100 The conference slot parent event field was not saving the parent event data. The new version of Civi automatically looks up the event information from the event id saved in that field, so I removed a bunch of old logic that did all that for us. The only thing that needs to be saved in that field now is the parent event id, which is what is happening. --- CRM/Event/Form/ManageEvent/Conference.php | 31 ----------------------- 1 file changed, 31 deletions(-) diff --git a/CRM/Event/Form/ManageEvent/Conference.php b/CRM/Event/Form/ManageEvent/Conference.php index ebf4d311e9..e5519306da 100644 --- a/CRM/Event/Form/ManageEvent/Conference.php +++ b/CRM/Event/Form/ManageEvent/Conference.php @@ -44,32 +44,6 @@ class CRM_Event_Form_ManageEvent_Conference extends CRM_Event_Form_ManageEvent { */ public $_action; - /** - * This function sets the default values for the form. For edit/view mode - * the default values are retrieved from the database - * - * @access public - * - * @return void - */ - function setDefaultValues() { - $parentDefaults = parent::setDefaultValues(); - - $eventId = $this->_id; - $params = array(); - $defaults = array(); - if (isset($eventId)) { - $params = array('id' => $eventId); - } - - CRM_Event_BAO_Event::retrieve($params, $defaults); - - $defaults = array_merge($defaults, $parentDefaults); - $defaults['id'] = $eventId; - - return $defaults; - } - /** * Function to build the form * @@ -101,11 +75,6 @@ class CRM_Event_Form_ManageEvent_Conference extends CRM_Event_Form_ManageEvent { $params = array(); $params = $this->exportValues(); - if (trim($params['parent_event_name']) === '') { - # believe me... - $params['parent_event_id'] = ''; - } - //update events table $params['id'] = $this->_id; CRM_Event_BAO_Event::add($params); -- 2.25.1