5847cd8496ad3bc5783f9f6eb03f97c7ff3699a1 braney Tue Jul 24 15:30:33 2018 -0700 fix problems with filtering on beds with less than 9 fields, and work around brain damaged cart variables that different based on the storage class of a bigBed field ... argh! diff --git src/hg/lib/hui.c src/hg/lib/hui.c index efca27e..617354c 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -3519,31 +3519,31 @@ { if (strchr(colonPair,':')) { if (second) *second = cloneString(strchr(colonPair,':') + 1); if (first) *first = strSwapChar(cloneString(colonPair),':',0); } else if (first) *first = cloneString(colonPair); return (*first != NULL || *second != NULL); } return FALSE; } -static boolean colonPairToInts(char * colonPair,int *first,int *second) +boolean colonPairToInts(char * colonPair,int *first,int *second) { // Non-destructive. Only sets values if found. No colon: value goes to *first char *a=NULL; char *b=NULL; if (colonPairToStrings(colonPair,&a,&b)) { if (a!=NULL) { if (first) *first = atoi(a); freeMem(a); } if (b!=NULL) { if (second) *second = atoi(b); @@ -5467,31 +5467,31 @@ { if (min && *min == NULL && minLoc != NULL) *min=minLoc; else freeMem(minLoc); if (max && *max == NULL && maxLoc != NULL) *max=maxLoc; else freeMem(maxLoc); return TRUE; } } return FALSE; } -static void getScoreIntRangeFromCart(struct cart *cart, struct trackDb *tdb, boolean parentLevel, +void getScoreIntRangeFromCart(struct cart *cart, struct trackDb *tdb, boolean parentLevel, char *scoreName, int *limitMin, int *limitMax,int *min,int *max) // gets an integer score range from the cart, but the limits from trackDb // for any of the pointers provided, will return a value found, if found, else it's contents // are undisturbed (use NO_VALUE to recognize unavaliable values) { char scoreLimitName[128]; char *deMin=NULL,*deMax=NULL; if ((limitMin || limitMax) && getScoreLimitsFromTdb(tdb,scoreName,NULL,&deMin,&deMax)) { if (deMin != NULL && limitMin) *limitMin = atoi(deMin); if (deMax != NULL && limitMax) *limitMax = atoi(deMax); freeMem(deMin); freeMem(deMax); @@ -5674,32 +5674,32 @@ struct slName *filterSettings = trackDbSettingsWildMatch(tdb, "*Filter"); if (filterSettings) { puts("<BR>"); struct slName *filter = NULL; #ifdef EXTRA_FIELDS_SUPPORT struct extraField *extras = extraFieldsGet(db,tdb); #else///ifndef EXTRA_FIELDS_SUPPORT struct sqlConnection *conn = hAllocConnTrack(db, tdb); struct asObject *as = asForTdb(conn, tdb); hFreeConn(&conn); #endif///ndef EXTRA_FIELDS_SUPPORT while ((filter = slPopHead(&filterSettings)) != NULL) { - if (differentString(filter->name,NO_SCORE_FILTER) - && differentString(filter->name,SCORE_FILTER)) // TODO: scoreFilter could be included + if (differentString(filter->name,NO_SCORE_FILTER)) + //&& differentString(filter->name,SCORE_FILTER)) // TODO: scoreFilter could be included { // Determine floating point or integer char *setting = trackDbSetting(tdb, filter->name); boolean isFloat = (strchr(setting,'.') != NULL); char *scoreName = cloneString(filter->name); char *field = filter->name; // No need to clone: will be thrown away at end of cycle int ix = strlen(field) - strlen("Filter"); assert(ix > 0); field[ix] = '\0'; #ifdef EXTRA_FIELDS_SUPPORT if (extras != NULL) { struct extraField *extra = extraFieldsFind(extras, field);