05eb41c63af8ccd369f76b022d3cf1faab5543c2 braney Thu May 26 16:25:07 2022 -0700 changes to support curated hubs diff --git src/hg/lib/web.c src/hg/lib/web.c index 2166e6d..7156252 100644 --- src/hg/lib/web.c +++ src/hg/lib/web.c @@ -893,31 +893,31 @@ * has been selected, and then adjust as necessary so that all three are * consistent. Detect changes and reset db-specific cart variables. * Save db, genome and clade in the cart so it will be consistent hereafter. * The order of preference here is as follows: * If we got a request that explicitly names the db, that takes * highest priority, and we synch the organism to that db. * If we get a cgi request for a specific organism then we use that * organism to choose the DB. If just clade, go from there. * In the cart only, we use the same order of preference. * If someone requests an Genome we try to give them the same db as * was in their cart, unless the Genome doesn't match. */ { boolean gotClade = hGotClade(); -*retDb = cgiOptionalString(dbCgiName); +*retDb = (dbOveride != NULL) ? dbOveride : cgiOptionalString(dbCgiName); if (*retDb == NULL) // if db is not in URL, but genome is, use it for db *retDb = cgiOptionalString(hgHubGenome); *retGenome = cgiOptionalString(orgCgiName); *retClade = cgiOptionalString(cladeCgiName); /* Was the database passed in as a cgi param? * If so, it takes precedence and determines the genome. */ if (*retDb && hDbExists(*retDb)) { *retGenome = hGenome(*retDb); } /* If no db was passed in as a cgi param then was the organism (a.k.a. genome) * passed in as a cgi param? * If so, the we use the proper database for that genome. */