From: Wilfried Göesgens Date: Thu, 20 Nov 2008 00:16:01 +0000 (+0000) Subject: * catch more render bugs X-Git-Tag: v7.86~1787 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=0d3e9dd6c1fdaf2ada4e76fe7491304d7877c0b3 * catch more render bugs * implement local recipient display with hostname if we don't hae a RFCA header. --- diff --git a/webcit/html2html.c b/webcit/html2html.c index e77c2a13e..f24ca184d 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -502,7 +502,7 @@ void UrlizeText(StrBuf* Target, StrBuf *Source, StrBuf *WrkBuf) for (pos = ChrPtr(Source); (pos < end) && (start == NULL); ++pos) { if (!strncasecmp(pos, "http://", 7)) start = pos; - if (!strncasecmp(pos, "ftp://", 6)) + else if (!strncasecmp(pos, "ftp://", 6)) start = pos; } diff --git a/webcit/messages.c b/webcit/messages.c index f263d5c1b..ffbfab310 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -246,7 +246,7 @@ int read_message(StrBuf *Target, const char *tmpl, long tmpllen, long msgnum, in const char *Key; Buf = NewStrBuf(); - lprintf(1, "-------------------MSG4 %ld|%s--------------\n", msgnum, ChrPtr(PartNum)); + lprintf(1, "----------%s---------MSG4 %ld|%s--------------\n", tmpl, msgnum, ChrPtr(PartNum)); serv_printf("MSG4 %ld|%s", msgnum, ChrPtr(PartNum)); StrBuf_ServGetln(Buf); if (GetServerStatus(Buf, NULL) != 1) { diff --git a/webcit/msg_renderers.c b/webcit/msg_renderers.c index 6b81166f9..f294c5e35 100644 --- a/webcit/msg_renderers.c +++ b/webcit/msg_renderers.c @@ -192,7 +192,11 @@ void tmplput_MAIL_SUMM_RFCA(StrBuf *Target, int nArgs, WCTemplateToken *Token, v message_summary *Msg = (message_summary*) Context; StrBufAppendBuf(Target, Msg->Rfca, 0); } - +int Conditional_MAIL_SUMM_RFCA(WCTemplateToken *Tokens, void *Context, int ContextType) +{ + message_summary *Msg = (message_summary*) Context; + return StrLength(Msg->Rfca) > 0; +} void examine_node(message_summary *Msg, StrBuf *HdrLine, StrBuf *FoundCharset) { @@ -812,6 +816,7 @@ InitModule_MSGRENDERERS RegisterNamespace("ATT:TYPE", 0, 1, tmplput_ATT_Contenttype, CTX_ATT); RegisterNamespace("ATT:FILENAME", 0, 1, tmplput_ATT_FileName, CTX_ATT); + RegisterConditional(HKEY("MAIL:SUMM:RFCA"), 0, Conditional_MAIL_SUMM_RFCA, CTX_MAILSUM); RegisterConditional(HKEY("COND:MAIL:SUMM:UNREAD"), 0, Conditional_MAIL_SUMM_UNREAD, CTX_MAILSUM); RegisterConditional(HKEY("COND:MAIL:SUMM:H_NODE"), 0, Conditional_MAIL_SUMM_H_NODE, CTX_MAILSUM); RegisterConditional(HKEY("COND:MAIL:SUMM:OTHERNODE"), 0, Conditional_MAIL_SUMM_OTHERNODE, CTX_MAILSUM); diff --git a/webcit/static/t/view_message.html b/webcit/static/t/view_message.html index b3bf0a534..058816792 100644 --- a/webcit/static/t/view_message.html +++ b/webcit/static/t/view_message.html @@ -5,8 +5,11 @@ onMouseOut=document.getElementById("msg").style.visibility="hidden
- ">""<> - *** + ">"" +<> + @ + + ***
- + - - + + - +
diff --git a/webcit/subst.c b/webcit/subst.c index 8fd62ef1a..3449489ab 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -827,18 +827,19 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf, case SV_GETTEXT: if (NewToken->nParameters !=1) { lprintf(1, "Gettext (in '%s' line %ld); " - "requires exactly 1 parameter, yau gave %ld params [%s]\n", + "requires exactly 1 parameter, you gave %ld params [%s]\n", ChrPtr(pTmpl->FileName), NewToken->Line, NewToken->nParameters, ChrPtr(NewToken->FlatToken)); + NewToken->Flags = 0; break; } break; case SV_SUBTEMPL: if (NewToken->nParameters != 1) { lprintf(1, "Subtemplates (in '%s' line %ld); " - "require exactly 1 parameter, yau gave %ld params [%s]\n", + "require exactly 1 parameter, you gave %ld params [%s]\n", ChrPtr(pTmpl->FileName), NewToken->Line, NewToken->nParameters, @@ -851,11 +852,12 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf, case SV_NEG_CONDITIONAL: if (NewToken->nParameters <2) { lprintf(1, "Conditional (in '%s' line %ld); " - "require at least 2 parameters, yau gave %ld params [%s]\n", + "require at least 2 parameters, you gave %ld params [%s]\n", ChrPtr(pTmpl->FileName), NewToken->Line, NewToken->nParameters, ChrPtr(NewToken->FlatToken)); + NewToken->Flags = 0; break; } if (!GetHash(Conditionals,