diff options
author | Sem <sembrestels@riseup.net> | 2012-07-20 05:45:54 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-07-20 05:45:54 +0200 |
commit | 3ac2c8fd0cacc57b8080be5f7d381b8cf5524f2f (patch) | |
tree | 46475df7579e0bf12c7bff62c3e125b16c641247 /actions | |
parent | 6e3d519f4ff1e163fe698607adba1568386d8c55 (diff) | |
parent | 86d154541f9cf1de74f79cae6c1b05b3214bdca8 (diff) | |
download | elgg-3ac2c8fd0cacc57b8080be5f7d381b8cf5524f2f.tar.gz elgg-3ac2c8fd0cacc57b8080be5f7d381b8cf5524f2f.tar.bz2 |
Merge branch 'full' of https://github.com/kevinjardine/Elgg-Event-Calendar
Diffstat (limited to 'actions')
-rw-r--r-- | actions/event_calendar/edit.php | 4 | ||||
-rw-r--r-- | actions/event_calendar/modify_full_calendar.php | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/actions/event_calendar/edit.php b/actions/event_calendar/edit.php index 0cc956d73..aef1a59cc 100644 --- a/actions/event_calendar/edit.php +++ b/actions/event_calendar/edit.php @@ -34,6 +34,10 @@ if ($event) { add_to_river('river/object/event_calendar/create','create',$user_guid,$event->guid); system_message(elgg_echo('event_calendar:add_event_response')); } + + if ($event->schedule_type == 'poll') { + forward('event_poll/add/'.$event->guid); + } forward($event->getURL()); } else { diff --git a/actions/event_calendar/modify_full_calendar.php b/actions/event_calendar/modify_full_calendar.php index 595bdbe4b..1e0bd3a01 100644 --- a/actions/event_calendar/modify_full_calendar.php +++ b/actions/event_calendar/modify_full_calendar.php @@ -3,9 +3,18 @@ elgg_load_library('elgg:event_calendar'); $event_guid = get_input('event_guid',0); $day_delta = get_input('dayDelta'); $minute_delta = get_input('minuteDelta',''); - -if (event_calendar_modify_full_calendar($event_guid,$day_delta,$minute_delta)) { +$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); + // special 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')); } |