]> code.citadel.org Git - citadel.git/blobdiff - webcit/calendar_tools.c
* "All day event" shows as a single checkbox, instead of one for the start
[citadel.git] / webcit / calendar_tools.c
index 77f478ee4ee926b4d536a7c3913a33d0e6020a6b..10d898baf404eca8b303c82f8d979258ec448f8e 100644 (file)
 #include "webcit.h"
 #include "webserver.h"
 
-#ifdef HAVE_ICAL_H
-
 char *months[] = {
        "January", "February", "March", "April", "May", "June", "July",
        "August", "September", "October", "November", "December"
 };
 
+char *days[] = {
+       "Sunday", "Monday", "Tuesday", "Wednesday",
+       "Thursday", "Friday", "Saturday"
+};
+
+#ifdef HAVE_ICAL_H
+
+
 void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) {
        int i;
        time_t now;
@@ -104,7 +110,6 @@ void display_icaltimetype_as_webform(struct icaltimetype *t, char *prefix) {
                );
        }
        wprintf("</SELECT>\n");
-
 }
 
 
@@ -127,6 +132,17 @@ struct icaltimetype icaltime_from_webform(char *prefix) {
 }
 
 
+/*
+ * Generae a new, globally unique UID parameter for a calendar object.
+ */
+void generate_new_uid(char *buf) {
+       static int seq = 0;
+
+       sprintf(buf, "%ld-%d@%s",
+               (long)time(NULL),
+               (seq++),
+               serv_info.serv_fqdn);
+}
 
 
 #endif