X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=webcit%2Ftasks.c;h=66b05e3e09f841ea2376a01702003a7e4c9aa92f;hp=adf758378e08cd549c26993ec61d1ba1be3770f6;hb=HEAD;hpb=307ff84a60b03889b9cd5ff84c29489177f9a39d diff --git a/webcit/tasks.c b/webcit/tasks.c index adf758378..89910eba4 100644 --- a/webcit/tasks.c +++ b/webcit/tasks.c @@ -1,6 +1,6 @@ #include "webcit.h" #include "calendar.h" -#include "webserver.h" + /* * qsort filter to move completed tasks to bottom of task list @@ -87,7 +87,6 @@ int tasks_RenderView_or_Tail(SharedMessageStatus *Stat, time_t due; char buf[SIZ]; icalproperty *p; - wcsession *WCC = WC; wc_printf("\n\n
"); wc_printf(_("Completed?")); @@ -115,8 +114,8 @@ int tasks_RenderView_or_Tail(SharedMessageStatus *Stat, task_completed_cmp); } - Pos = GetNewHashPos(WCC->disp_cal_items, 0); - while (GetNextHashPos(WCC->disp_cal_items, Pos, &hklen, &HashKey, &vCal)) { + Pos = GetNewHashPos(WC->disp_cal_items, 0); + while (GetNextHashPos(WC->disp_cal_items, Pos, &hklen, &HashKey, &vCal)) { icalproperty_status todoStatus; int is_date; @@ -230,6 +229,11 @@ void display_edit_individual_task(icalcomponent *supplied_vtodo, long msgnum, ch wc_printf("
\n"); wc_printf("
\n"); wc_printf("
\n "); + + wc_printf("WBuf, WC->CurRoom.name, NULL, 0, 0); + wc_printf("\">\n"); + wc_printf("\n", WC->nonce); wc_printf("\n", msgnum); wc_printf("\n", @@ -498,7 +502,7 @@ void save_individual_task(icalcomponent *supplied_vtodo, long msgnum, char* from ); } /** Give this task a UID if it doesn't have one. */ - syslog(9, "Give this task a UID if it doesn't have one.\n"); + syslog(LOG_DEBUG, "Give this task a UID if it doesn't have one.\n"); if (icalcomponent_get_first_property(vtodo, ICAL_UID_PROPERTY) == NULL) { generate_uuid(buf); @@ -508,17 +512,17 @@ void save_individual_task(icalcomponent *supplied_vtodo, long msgnum, char* from } /* Increment the sequence ID */ - syslog(9, "Increment the sequence ID\n"); + syslog(LOG_DEBUG, "Increment the sequence ID\n"); while (prop = icalcomponent_get_first_property(vtodo, ICAL_SEQUENCE_PROPERTY), (prop != NULL) ) { i = icalproperty_get_sequence(prop); - syslog(9, "Sequence was %d\n", i); + syslog(LOG_DEBUG, "Sequence was %d\n", i); if (i > sequence) sequence = i; icalcomponent_remove_property(vtodo, prop); icalproperty_free(prop); } ++sequence; - syslog(9, "New sequence is %d. Adding...\n", sequence); + syslog(LOG_DEBUG, "New sequence is %d. Adding...\n", sequence); icalcomponent_add_property(vtodo, icalproperty_new_sequence(sequence) ); @@ -530,7 +534,7 @@ void save_individual_task(icalcomponent *supplied_vtodo, long msgnum, char* from * can't encapsulate something that may already be encapsulated * somewhere else. */ - syslog(9, "Encapsulating into a full VCALENDAR component\n"); + syslog(LOG_DEBUG, "Encapsulating into a full VCALENDAR component\n"); encaps = ical_encapsulate_subcomponent(icalcomponent_new_clone(vtodo)); /* Serialize it and save it to the message base */ @@ -570,7 +574,7 @@ void save_individual_task(icalcomponent *supplied_vtodo, long msgnum, char* from /* Go back to wherever we came from */ if (ibstr("return_to_summary") == 1) { - do_template("summary_page"); + display_summary_page(); } else { readloop(readfwd, eUseDefault); @@ -597,7 +601,6 @@ void load_task(icalcomponent *event, long msgnum, char *from, int unread, calvie { icalproperty *ps = NULL; struct icaltimetype dtstart, dtend; - wcsession *WCC = WC; disp_cal *Cal; size_t len; icalcomponent *cptr = NULL; @@ -605,8 +608,8 @@ void load_task(icalcomponent *event, long msgnum, char *from, int unread, calvie dtstart = icaltime_null_time(); dtend = icaltime_null_time(); - if (WCC->disp_cal_items == NULL) { - WCC->disp_cal_items = NewHash(0, Flathash); + if (WC->disp_cal_items == NULL) { + WC->disp_cal_items = NewHash(0, Flathash); } Cal = (disp_cal*) malloc(sizeof(disp_cal)); @@ -649,7 +652,7 @@ void load_task(icalcomponent *event, long msgnum, char *from, int unread, calvie /* Store it in the hash list. */ /* syslog(LOG_DEBUG, "INITIAL: %s", ctime(&Cal->event_start)); */ - Put(WCC->disp_cal_items, + Put(WC->disp_cal_items, (char*) &Cal->event_start, sizeof(Cal->event_start), Cal, @@ -752,6 +755,7 @@ InitModule_TASKS NULL, tasks_LoadMsgFromServer, tasks_RenderView_or_Tail, - tasks_Cleanup); + tasks_Cleanup, + NULL); WebcitAddUrlHandler(HKEY("save_task"), "", 0, save_task, 0); }