aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-11-23 01:05:31 +0100
committerSem <sembrestels@riseup.net>2012-11-23 01:05:31 +0100
commit39bca929f875ca6e9bd422b112d1e48b717fa126 (patch)
treedb17973fedc2bb72ba25dbfde6513e5194c69be2 /actions
parent58eebf19ad92aa1c3247aaec4f61e1440a81523a (diff)
parent75bd3af84a76345928a831eecbc5d0f99f9fead4 (diff)
downloadelgg-39bca929f875ca6e9bd422b112d1e48b717fa126.tar.gz
elgg-39bca929f875ca6e9bd422b112d1e48b717fa126.tar.bz2
Merge branch 'full' of git://github.com/kevinjardine/Elgg-Event-Calendar
Diffstat (limited to 'actions')
-rw-r--r--actions/event_calendar/join_conference.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/actions/event_calendar/join_conference.php b/actions/event_calendar/join_conference.php
new file mode 100644
index 000000000..9eb8f0da9
--- /dev/null
+++ b/actions/event_calendar/join_conference.php
@@ -0,0 +1,20 @@
+<?php
+// extended logic for BBB
+elgg_load_library('elgg:event_calendar');
+
+$event_guid = get_input('event_guid');
+$event = get_entity($event_guid);
+if (elgg_instanceof($event,'object','event_calendar')) {
+ // make sure that the conference still exists, and if not, try recreating it
+ if (event_calendar_conference_exists($event)) {
+ event_calendar_join_conference($event);
+ } else if (event_calendar_create_bbb_conf($event)) {
+ event_calendar_join_conference($event);
+ } else {
+ register_error(elgg_echo('event_calendar:couldnotjoin'));
+ forward($event->getURL());
+ }
+} else {
+ register_error(elgg_echo('event_calendar:error_nosuchevent'));
+ forward('event_calendar/list');
+}