Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixing ical support. #407

Merged
merged 1 commit into from

2 participants

@mapkyca

Added the necessary views to support ical again and added a header disposition to give the export a more useful filename.

@ewinslow
Owner

Thanks! Sorry is taken so long to acknowledge this.

@ewinslow ewinslow merged commit 504d7f9 into Elgg:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 18, 2012
  1. @mapkyca

    Fixing ical support.

    mapkyca authored
This page is out of date. Refresh to see the latest.
View
19 views/ical/page/components/list.php
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Elgg ICAL List view
+ *
+ * @uses $vars['items']
+ * @package Elgg
+ * @subpackage Core
+ *
+ */
+$items = $vars['items'];
+
+if (is_array($items) && count($items) > 0) {
+
+ foreach ($items as $item) {
+ echo elgg_view_list_item($item, $vars);
+
+ }
+}
+
View
1  views/ical/page/default.php
@@ -10,6 +10,7 @@
$site = elgg_get_site_entity();
header("Content-Type: text/calendar");
+header('Content-Disposition: attachment; filename="'.$vars['title'].'.ics"');
?>
BEGIN:VCALENDAR
View
5 views/ical/page/layouts/default.php
@@ -0,0 +1,5 @@
+<?php
+/**
+ * ICal layout shell
+ */
+echo $vars['content'];
Something went wrong with that request. Please try again.