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, 16 Nov 2010 22:02:17 +0000 (23:02 +0100)
webcit/subst.c

index 20ff89bf7654185354f269046cf237fb119ba403..bfffef3f4cbf88aa07b7b0922035f4f3f8f25035 100644 (file)
@@ -2229,8 +2229,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)