diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 15:08:30 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-03-15 15:08:30 -0300 |
commit | 9ca1ec52d98470c67d9ce756159935fe684347b0 (patch) | |
tree | 66fa7070b1837cd59962127b6c8b7d4fc19f95e9 /pages/event_connector | |
download | elgg-9ca1ec52d98470c67d9ce756159935fe684347b0.tar.gz elgg-9ca1ec52d98470c67d9ce756159935fe684347b0.tar.bz2 |
Squashed 'mod/event_connect/' content from commit 3688c10
git-subtree-dir: mod/event_connect
git-subtree-split: 3688c10f1bfdaecdb0bb515b2ce3d8490d0487c8
Diffstat (limited to 'pages/event_connector')
-rw-r--r-- | pages/event_connector/import.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pages/event_connector/import.php b/pages/event_connector/import.php new file mode 100644 index 000000000..e496bb9f8 --- /dev/null +++ b/pages/event_connector/import.php @@ -0,0 +1,36 @@ +<?php
+/**
+ * Import an iCal
+ *
+ * @package ElggEventConnector
+ */
+
+gatekeeper();
+
+$container_guid = (int) get_input('guid');
+$container = get_entity($container_guid);
+if (!$container) {
+ forward(REFERER);
+}
+
+if (elgg_instanceof($container, 'group') && $container->event_calendar_enable == "no") {
+ register_error(elgg_echo('event_connector:error:group_calendar'));
+ forward(REFERER);
+}
+
+elgg_set_page_owner_guid($container->getGUID());
+
+$title = elgg_echo('event_connector:upload');
+elgg_push_breadcrumb($title);
+
+$form_vars = array('enctype' => 'multipart/form-data');
+$vars = array('container_guid' => $container_guid);
+$content = elgg_view_form('event_connector/import', $form_vars, $vars);
+
+$body = elgg_view_layout('content', array(
+ 'filter' => '',
+ 'content' => $content,
+ 'title' => $title,
+));
+
+echo elgg_view_page($title, $body);
|