protected function action_removeAllRecurrences() { if (!empty($this->bean->repeat_parent_id)) { $id = $this->bean->repeat_parent_id; $this->bean->retrieve($id); } else { $id = $this->bean->id; } if (!$this->bean->ACLAccess('Delete')) { ACLController::displayNoAccess(true); sugar_cleanup(true); } require_once "modules/Calendar/CalendarUtils.php"; CalendarUtils::markRepeatDeleted($this->bean); $this->bean->mark_deleted($id); header("Location: index.php?module=Meetings"); }
/** * Saves recurring records if needed. Flushes existing recurrences if needed. */ protected function processRecurring(Meeting $focus) { require_once "modules/Calendar/CalendarUtils.php"; if (!empty($_REQUEST['edit_all_recurrences'])) { // flush existing recurrence CalendarUtils::markRepeatDeleted($focus); } if (count($this->repeatDataArray) > 0) { // prevent sending invites for recurring activities unset($_REQUEST['send_invites'], $_POST['send_invites']); $this->recurringCreated = CalendarUtils::saveRecurring($focus, $this->repeatDataArray); } }
/** * Action Remove */ protected function action_remove() { $this->view = 'json'; if (!$this->retrieveCurrentBean('Delete')) { return; } if ($this->currentBean->module_dir == "Meetings" || $this->currentBean->module_dir == "Calls") { if (!empty($_REQUEST['remove_all_recurrences']) && $_REQUEST['remove_all_recurrences']) { CalendarUtils::markRepeatDeleted($this->currentBean); } } $this->currentBean->mark_deleted($_REQUEST['record']); $this->view_object_map['jsonData'] = array('access' => 'yes'); }
/** * Deletes the child recurrences of the given bean * * @param $bean */ public function deleteRecurrences($bean) { CalendarUtils::markRepeatDeleted($bean); }
/** * Mark recurring event deleted * @param SugarBean parent Bean */ protected function markRepeatDeleted(SugarBean $parentBean) { CalendarUtils::markRepeatDeleted($parentBean); }