From: Wilfried Göesgens Date: Wed, 4 Feb 2009 04:15:33 +0000 (+0000) Subject: * fix another off by one while retrieving the iterator counter params X-Git-Tag: v7.86~1503 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=5e564e4ea0c967576f0e87cd772958e1a53068c2 * fix another off by one while retrieving the iterator counter params * fix token notation --- diff --git a/webcit/static/t/mailsummary_json.html b/webcit/static/t/mailsummary_json.html index 3369d4570..9f2b72e2e 100644 --- a/webcit/static/t/mailsummary_json.html +++ b/webcit/static/t/mailsummary_json.html @@ -1,5 +1,5 @@ { "nummsgs": , "startmsg": , "roomname": "", -"msgs": [ ] -} \ No newline at end of file +"msgs": [ ] +} diff --git a/webcit/subst.c b/webcit/subst.c index f4fde0edb..faf685dbd 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -1830,14 +1830,14 @@ void tmpl_iterate_subtmpl(StrBuf *Target, WCTemplputParams *TP) SubTP.Filter.ControlContextType = CTX_ITERATE; SubTP.ControlContext = &Status; + if (HAVE_PARAM(2)) { + StartAt = GetTemplateTokenNumber(Target, TP, 2, 0); + } if (HAVE_PARAM(3)) { - StartAt = GetTemplateTokenNumber(Target, TP, 3, 0); + StepWidth = GetTemplateTokenNumber(Target, TP, 3, 0); } if (HAVE_PARAM(4)) { - StepWidth = GetTemplateTokenNumber(Target, TP, 4, 0); - } - if (HAVE_PARAM(5)) { - StopAt = GetTemplateTokenNumber(Target, TP, 5, -1); + StopAt = GetTemplateTokenNumber(Target, TP, 4, -1); } it = GetNewHashPos(List, StepWidth); if (StopAt < 0) {