#include "webcit.h"
#include "calendar.h"
-#include "webserver.h"
+
/*
* qsort filter to move completed tasks to bottom of task list
time_t due;
char buf[SIZ];
icalproperty *p;
- wcsession *WCC = WC;
wc_printf("<table class=\"calendar_view_background\"><tbody id=\"taskview\">\n<tr>\n<th>");
wc_printf(_("Completed?"));
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;
icalcomponent *vtodo;
icalproperty *p;
struct icaltimetype IcalTime;
- time_t now;
int created_new_vtodo = 0;
icalproperty_status todoStatus;
- now = time(NULL);
-
if (supplied_vtodo != NULL) {
vtodo = supplied_vtodo;
wc_printf("<div class=\"boxcontent\">\n");
wc_printf("<FORM METHOD=\"POST\" action=\"save_task\">\n");
wc_printf("<div style=\"display: none;\">\n ");
+
+ wc_printf("<input type=\"hidden\" name=\"go\" value=\"");
+ StrEscAppend(WC->WBuf, WC->CurRoom.name, NULL, 0, 0);
+ wc_printf("\">\n");
+
wc_printf("<input type=\"hidden\" name=\"nonce\" value=\"%d\">\n", WC->nonce);
wc_printf("<INPUT TYPE=\"hidden\" NAME=\"msgnum\" VALUE=\"%ld\">\n", msgnum);
wc_printf("<INPUT TYPE=\"hidden\" NAME=\"return_to_summary\" VALUE=\"%d\">\n",
);
}
/** 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);
}
/* 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)
);
* 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 */
/* Go back to wherever we came from */
if (ibstr("return_to_summary") == 1) {
- do_template("summary_page");
+ display_summary_page();
}
else {
readloop(readfwd, eUseDefault);
{
icalproperty *ps = NULL;
struct icaltimetype dtstart, dtend;
- wcsession *WCC = WC;
disp_cal *Cal;
size_t len;
icalcomponent *cptr = NULL;
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));
/* 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,
void **ViewSpecific,
long oper,
char *cmd,
- long len)
+ long len,
+ char *filter,
+ long flen)
{
strcpy(cmd, "MSGS ALL");
Stat->maxmsgs = 32767;
tasks_GetParamsGetServerCall,
NULL,
NULL,
+ NULL,
tasks_LoadMsgFromServer,
tasks_RenderView_or_Tail,
- tasks_Cleanup);
+ tasks_Cleanup,
+ NULL);
WebcitAddUrlHandler(HKEY("save_task"), "", 0, save_task, 0);
}