X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=webcit%2Fical_subst.c;fp=webcit%2Fical_subst.c;h=428527eb49dd224a462dfc69d47697a642dd0302;hb=74210f758b7a01766b7a84bf02015469e98f2105;hp=43a10f2eb503cbbb336425ec0d7b0de1b43fc7f5;hpb=9a02a1c668813fd47f1b9d4d837e91789aa9840a;p=citadel.git diff --git a/webcit/ical_subst.c b/webcit/ical_subst.c index 43a10f2eb..428527eb4 100644 --- a/webcit/ical_subst.c +++ b/webcit/ical_subst.c @@ -265,14 +265,16 @@ void tmplput_CtxICalPropertyDate(StrBuf *Target, WCTemplputParams *TP) -void render_MIME_ICS_TPL(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCharset) +void render_MIME_ICS_TPL(StrBuf *Target, WCTemplputParams *TP, StrBuf *FoundCharset) { + wc_mime_attachment *Mime = CTX(CTX_MIME_ATACH); icalproperty_method the_method = ICAL_METHOD_NONE; icalproperty *method = NULL; icalcomponent *cal; icalcomponent *c; WCTemplputParams SubTP; WCTemplputParams SuperTP; + static int divcount = 0; if (StrLength(Mime->Data) == 0) { @@ -288,6 +290,8 @@ void render_MIME_ICS_TPL(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *Foun } putlbstr("divname", ++divcount); + + putbstr("cal_partnum", NewStrBufDup(Mime->PartNum)); putlbstr("msgnum", Mime->msgnum); @@ -305,8 +309,12 @@ void render_MIME_ICS_TPL(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *Foun the_method = icalproperty_get_method(method); } - SuperTP.Context = &the_method; - SuperTP.Filter.ContextType = CTX_ICALMETHOD, + StackContext (TP, + &SuperTP, + &the_method, + CTX_ICALMETHOD, + 0, + TP->Tokens); StackContext (&SuperTP, &SubTP, @@ -327,6 +335,7 @@ void render_MIME_ICS_TPL(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *Foun "EnableOrDisableCheckButton(); \n" ); + UnStackContext(&SuperTP); UnStackContext(&SubTP); icalcomponent_free(cal); } @@ -368,10 +377,6 @@ int cond_ICalIsMethod(StrBuf *Target, WCTemplputParams *TP) - - - - void tmplput_Conflict(StrBuf *Target, WCTemplputParams *TP) {} @@ -413,7 +418,6 @@ HashList* IterateGetAttendees() } - void InitModule_ICAL_SUBST (void)