summaryrefslogtreecommitdiff
path: root/forum/utils/calendar.php
diff options
context:
space:
mode:
authordeva <deva>2008-11-25 15:52:44 +0000
committerdeva <deva>2008-11-25 15:52:44 +0000
commit21c12bfb323d5b078eb70c20be8ea18be081a936 (patch)
tree6b10eab35bbef4d67e63de4588e0da76bdb561eb /forum/utils/calendar.php
parent56b12d452c44374fc3f673578586387bd7840b36 (diff)
Added post-to-google-calendar through Zend (when installed)
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);