aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorKevin Jardine <kevinjardine@yahoo.com>2012-09-07 11:29:38 +0200
committerKevin Jardine <kevinjardine@yahoo.com>2012-09-07 11:29:38 +0200
commite2410ff02068bd012174ff31b143c11f65f0f485 (patch)
tree3401a03fe44703a7af789d263d2ae1f138cd1e34 /actions
parent381e87e243e357d804f6113758ac00b69a0b436b (diff)
downloadelgg-e2410ff02068bd012174ff31b143c11f65f0f485.tar.gz
elgg-e2410ff02068bd012174ff31b143c11f65f0f485.tar.bz2
join now recreates conference if necessary
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');
+}