check whether the sorting algorithm specified via BSTRs is intended for us before...
authorWilfried Goesgens <dothebart@citadel.org>
Tue, 9 Nov 2010 00:29:50 +0000 (01:29 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Tue, 9 Nov 2010 00:29:50 +0000 (01:29 +0100)
webcit/subst.c

index 3a9d26169f6142024c90f1d8338b76f08a23e011..bc6c747fab82040f1eb4895f3f86417d22324882 100644 (file)
@@ -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)