$AppUI->redirect(); } } $obj->event_project = $event_project ? $event_project : $obj->event_project; // load the event types $types = w2PgetSysVal('EventType'); // Load the users $perms =& $AppUI->acl(); $users = $perms->getPermittedUsers('calendar'); // Load the assignees $assigned = array(); if ($is_clash) { $assignee_list = $_SESSION['add_event_attendees']; if (isset($assignee_list) && $assignee_list) { $event = new CEvent(); $assigned = $event->getAssigneeList($assignee_list); } // Now that we have loaded the possible replacement event, remove the stored // details, NOTE: This could cause using a back button to make things break, // but that is the least of our problems. unset($_SESSION['add_event_post']); unset($_SESSION['add_event_attendees']); unset($_SESSION['add_event_mail']); unset($_SESSION['add_event_clash']); unset($_SESSION['event_is_clash']); } else { if ($event_id == 0) { $assigned[$AppUI->user_id] = $AppUI->user_display_name; } else { $assigned = $obj->getAssigned(); }