]> code.citadel.org Git - citadel.git/blobdiff - webcit/subst.c
* print name of context instead of number into the error message.
[citadel.git] / webcit / subst.c
index 2bcb8949ffe6b1fef69cebe9f2f7c729f0f94306..1807211afc3278154c21e25a97615bebf1b068a2 100644 (file)
@@ -2175,10 +2175,11 @@ void tmplput_Comment(StrBuf *Target, WCTemplputParams *TP)
                const char *pch;
                long len;
 
-               GetTemplateTokenString(Target, TP, 2, &pch, &len);
+               GetTemplateTokenString(Target, TP, 0, &pch, &len);
                Comment = NewStrBufPlain(pch, len);
+               StrBufAppendBufPlain(Target, HKEY("<!--"), 0);
                StrBufAppendTemplate(Target, TP, Comment, 1);
-
+               StrBufAppendBufPlain(Target, HKEY("-->"), 0);
                FreeStrBuf(&Comment);
        }
 }
@@ -2315,9 +2316,9 @@ void tmpl_iterate_subtmpl(StrBuf *Target, WCTemplputParams *TP)
            (It->XPectContextType != TP->Filter.ContextType)) {
                LogTemplateError(
                        Target, "Iterator", ERR_PARM1, TP,
-                       "requires context of type %d, have %d", 
-                       It->XPectContextType
-                       TP->Filter.ContextType);
+                       "requires context of type %s, have %s", 
+                       ContextName(It->XPectContextType)
+                       ContextName(TP->Filter.ContextType));
                return ;
                
        }