6c5cc98477af424865533ac39e22adf968a2f98d galt Tue Oct 4 12:55:30 2022 -0700 cdw fixes for sqlSafef v2, and a minor bug fix of Jims refactoring of facet code. diff --git src/hg/lib/tablesTables.c src/hg/lib/tablesTables.c index 5bca118..5cb4f42 100644 --- src/hg/lib/tablesTables.c +++ src/hg/lib/tablesTables.c @@ -791,31 +791,38 @@ } if (visibleFacetList) // close right column, if there are two columns printf(""); printf("\n"); //close parent container } void webSortableFieldedTable(struct cart *cart, struct fieldedTable *table, char *returnUrl, char *varPrefix, int maxLenField, struct hash *tagOutputWrappers, void *wrapperContext) /* Display all of table including a sortable label row. The tagOutputWrappers * is an optional way to enrich output of specific columns of the table. It is keyed * by column name and has for values functions of type webTableOutputWrapperType. */ { -webFilteredFieldedTable(cart, table, NULL, returnUrl, varPrefix, +struct dyString *visibleFacetList = dyStringNew(256); +int i; +for (i = 0; i < table->fieldCount; ++i) + { + if (i > 0) dyStringPrintf(visibleFacetList, ","); + dyStringPrintf(visibleFacetList, "%s", table->fields[i]); + } +webFilteredFieldedTable(cart, table, visibleFacetList->string, returnUrl, varPrefix, maxLenField, tagOutputWrappers, wrapperContext, FALSE, NULL, slCount(table->rowList), 0, NULL, NULL, NULL, NULL, NULL, FALSE); } void webTableBuildQuery(struct cart *cart, char *from, char *initialWhere, char *varPrefix, char *fields, boolean withFilters, struct dyString **retQuery, struct dyString **retWhere) /* Construct select, from and where clauses in query, keeping an additional copy of where * Returns the SQL query and the SQL where expression as two dyStrings (need to be freed) */ { struct dyString *query = dyStringNew(0); struct dyString *where = dyStringNew(0);