NewSort->Reverse = Reverse;
NewSort->GroupChange = GroupChange;
NewSort->ContextType = ContextType;
+ if (ContextType == CTX_NONE) {
+ lprintf(1, "sorting requires a context. CTX_NONE won't make it.\n");
+ exit(1);
+ }
+
Put(SortHash, name, len, NewSort, DestroySortStruct);
}
}
SortBy = (SortStruct*)vSortBy;
+ if (SortBy->ContextType != TP->Filter.ContextType)
+ return NULL;
+
/** Ok, its us, lets see in which direction we should sort... */
if (havebstr("SortOrder")) {
SortOrder = LBSTR("SortOrder");