* fix some logmessages, so not we output the right information
authorWilfried Göesgens <willi@citadel.org>
Fri, 1 Jan 2010 15:53:29 +0000 (15:53 +0000)
committerWilfried Göesgens <willi@citadel.org>
Fri, 1 Jan 2010 15:53:29 +0000 (15:53 +0000)
webcit/subst.c

index 31be4b4a8a016399b0b8da15ee98caf110367ce4..36828a6cddd48d4d2811e8c8b4156bfcb406746c 100644 (file)
@@ -1420,7 +1420,7 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf,
        case SV_NEG_CONDITIONAL:
                if (NewToken->nParameters <2) {
                        LogTemplateError(
-                               NULL, "Conditional", ERR_NAME, &TP,
+                               NULL, "Conditional", ERR_PARM1, &TP,
                                "require at least 2 parameters, you gave %d params", 
                                NewToken->nParameters);
                        NewToken->Flags = 0;
@@ -1428,7 +1428,7 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf,
                }
                if (NewToken->Params[1]->lvalue == 0) {
                        LogTemplateError(
-                               NULL, "Conditional", ERR_NAME, &TP,
+                               NULL, "Conditional", ERR_PARM1, &TP,
                                "Conditional ID (Parameter 1) mustn't be 0!");
                        NewToken->Flags = 0;
                        break;
@@ -1442,7 +1442,7 @@ WCTemplateToken *NewTemplateSubstitute(StrBuf *Buf,
                            (NewToken->Params[0]->Start[0] == 'X'))
                                break;
                        LogTemplateError(
-                               NULL, "Conditional", ERR_NAME, &TP,
+                               NULL, "Conditional", ERR_PARM1, &TP,
                                "Not found!");
 /*
                        NewToken->Error = NewStrBuf();
@@ -1724,7 +1724,7 @@ int LoadTemplateDir(const StrBuf *DirName, HashList *wireless, HashList *big, co
                        }
                        StrBufAppendBufPlain(Key, filedir_entry->d_name, MinorPtr - filedir_entry->d_name, 0);
 
-                       if (LoadTemplates > 1)
+                       if (LoadTemplates >= 1)
                                lprintf(1, "%s %d %s\n", ChrPtr(FileName), IsMobile, ChrPtr(Key));
                        if (LoadTemplates == 0)
                                load_template(FileName, Key, (IsMobile)?wireless:big);
@@ -2054,7 +2054,7 @@ int preeval_iterate(WCTemplateToken *Token)
        TP->Tokens = Token;
        if (!GetHash(Iterators, TKEY(0), &vIt)) {
                LogTemplateError(
-                       NULL, "Iterator", ERR_NAME, TP,
+                       NULL, "Iterator", ERR_PARM1, TP,
                        "not found");
                return 0;
        }