From: Wilfried Goesgens Date: Tue, 9 Nov 2010 00:29:50 +0000 (+0100) Subject: check whether the sorting algorithm specified via BSTRs is intended for us before... X-Git-Tag: v8.01~598 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=abc90f03433db7a011dd09c0a7e5323606965be4 check whether the sorting algorithm specified via BSTRs is intended for us before using its groupchange detector. --- diff --git a/webcit/subst.c b/webcit/subst.c index 3a9d26169..bc6c747fa 100644 --- a/webcit/subst.c +++ b/webcit/subst.c @@ -1886,8 +1886,10 @@ void tmpl_iterate_subtmpl(StrBuf *Target, WCTemplputParams *TP) if (GetHash(SortHash, SKEY(BSort), &vSortBy) && (vSortBy != NULL)) { SortBy = (SortStruct*)vSortBy; + /* first check whether its intended for us... */ + if ((SortBy->ContextType == It->ContextType)&& /** Ok, its us, lets see in which direction we should sort... */ - if (havebstr("SortOrder")) { + (havebstr("SortOrder"))) { int SortOrder; SortOrder = LBSTR("SortOrder"); if (SortOrder != 0)