summaryrefslogtreecommitdiff
path: root/forum/utils/calendar.php
diff options
context:
space:
mode:
authordeva <deva>2010-02-13 15:32:46 +0000
committerdeva <deva>2010-02-13 15:32:46 +0000
commit4bc94301b666395106adaee96767d629b51ef445 (patch)
tree7903d6922f59851a433cc43a9216790d0a8d2eba /forum/utils/calendar.php
parentde27f1f5868ff837bab30b2131a3f67541b3c4a2 (diff)
Add 'export to dokuwiki calendar' functionality.
Diffstat (limited to 'forum/utils/calendar.php')
-rw-r--r--forum/utils/calendar.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/forum/utils/calendar.php b/forum/utils/calendar.php
index 006922c..318f458 100644
--- a/forum/utils/calendar.php
+++ b/forum/utils/calendar.php
@@ -23,6 +23,22 @@ if($action=="addentry") {
if($ZEND_DIR != "") googleCalendarEvent($event);
+ if($DOKUWIKI_CALENDAR != "") {
+ $file = $DOKUWIKI_CALENDAR;
+ $fp = fopen($file, "w");
+
+ fprintf($fp, "=====DIEs calendar=====\n");
+ fprintf($fp, "Do not edit this file - it is automatically generated by the ExecutionRoom CMS.\n\n");
+ fprintf($fp, "====Events====\n");
+ foreach($events->events as $event) {
+ fprintf($fp, " * %s - %s %s: %s\n",
+ date("j.n.Y G:i", $event->starttime),
+ date("j.n.Y G:i", $event->starttime + $event->duration),
+ $event->title, $event->description);
+ }
+ fclose($fp);
+ }
+
notify("calendar", "New calendar entry:\n" . $title . "\n" . date("r", $time) . "\n" .
$description . "\n" .
$FORUM_URL . "/?mode=calendar&date=" . $time);