From: Wilfried Göesgens Date: Sun, 25 Oct 2009 09:33:23 +0000 (+0000) Subject: * use macro for templateparam custom parameters X-Git-Tag: v7.86~701 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=6407b2dc6f0751fc6da23046994af878045a2a35 * use macro for templateparam custom parameters --- diff --git a/webcit/preferences.c b/webcit/preferences.c index 3afa42d81..4934388f1 100644 --- a/webcit/preferences.c +++ b/webcit/preferences.c @@ -810,7 +810,7 @@ void tmplput_CFG_RoomValueLong(StrBuf *Target, WCTemplputParams *TP) long lvalue; long defval = 0; - if (TP->Tokens->nParameters > 1) + if (HAVE_PARAM(1)) defval = GetTemplateTokenNumber(Target, TP, 1, 0); get_ROOM_PREFS_LONG(TKEY(0), &lvalue, defval); StrBufAppendPrintf(Target, "%ld", lvalue); @@ -837,7 +837,7 @@ int ConditionalPreference(StrBuf *Target, WCTemplputParams *TP) if (!get_PREFERENCE(TKEY(2), &Pref)) return 0; - if (TP->Tokens->nParameters == 3) { + if (!HAVE_PARAM(3)) { return 1; } else if (TP->Tokens->Params[3]->Type == TYPE_STR)