aboutsummaryrefslogtreecommitdiff
path: root/actions/event_calendar/modify_full_calendar.php
blob: 9288eb0e0315e8769e23e070015e00aea1a9efd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
elgg_load_library('elgg:event_calendar');
$event_guid = get_input('event_guid',0);
$day_delta = get_input('dayDelta');
$minute_delta = get_input('minuteDelta','');
$start_time = get_input('startTime','');
$resend = get_input('resend','');
$minutes = get_input('minutes');
$iso_date = get_input('iso_date');
$result = event_calendar_modify_full_calendar($event_guid,$day_delta,$minute_delta,$start_time,$resend,$minutes,$iso_date);
if ($result) {
	$response = array('success'=>TRUE);
	// specially handling for event polls
	if (is_array($result)) {
		$response['minutes'] = $result['minutes'];
		$response['iso_date'] = $result['iso_date'];
	}
} else {	
	$response = array('success'=>FALSE, 'message' =>elgg_echo('event_calendar:modify_full_calendar:error'));
}

echo json_encode($response);

exit;