summaryrefslogtreecommitdiff
path: root/forum/utils/calendar.php
diff options
context:
space:
mode:
Diffstat (limited to 'forum/utils/calendar.php')
-rw-r--r--forum/utils/calendar.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/forum/utils/calendar.php b/forum/utils/calendar.php
index 84ebe18..1cf8d4a 100644
--- a/forum/utils/calendar.php
+++ b/forum/utils/calendar.php
@@ -1,6 +1,7 @@
<?php
include_once($UTIL_DIR . "/events.php");
include_once($UTIL_DIR . "/notify.php");
+if($ZEND_DIR != "") include_once($UTIL_DIR . "/googlecalendar.php");
$events = new Events($DATA_DIR . "/calendar.xml");
@@ -14,7 +15,10 @@ if($action=="addentry") {
$eid = time();
$event = new Event($eid, $title, $time, $duration, $description, $current_user->uid);
$events->add($event);
- $events->write();
+ $events->write();
+
+ if($ZEND_DIR != "") googleCalendarEvent($event);
+
notify("calendar", "New calendar entry:\n" . $title . "\n" . date("r", $time) . "\n" .
$description . "\n" .
$FORUM_URL . "/?mode=calendar&date=" . $time);