ea1bd03c5da8c0e084bbf39e938c25760167b03f hiram Thu Feb 6 11:48:24 2025 -0800 had the logic backwards on that isCuratedHubUrl function refs #34706 diff --git src/hg/hgGateway/hgGateway.c src/hg/hgGateway/hgGateway.c index dd73b21af61..9c35a6eb8ab 100644 --- src/hg/hgGateway/hgGateway.c +++ src/hg/hgGateway/hgGateway.c @@ -128,48 +128,48 @@ char *position) /* Write JSON for the info needed to populate the 'Find Position' section. */ { char *genome = hGenome(db); if (isEmpty(genome)) { jsonWriteStringf(jw, "error", "No genome for db '%s'", db); } else { jsonWriteString(jw, "db", db); jsonWriteNumber(jw, "taxId", taxId); jsonWriteString(jw, "genome", genome); struct slPair *dbOptions = NULL; char genomeLabel[PATH_LEN*4]; - if (! isCuratedHubUrl(hubUrl)) + if (isCuratedHubUrl(hubUrl)) + { + dbOptions = hGetDbOptionsForGenome(trackHubSkipHubName(genome)); + safecpy(genomeLabel, sizeof(genomeLabel), genome); + } + else { struct trackHub *hub = hubConnectGetHub(hubUrl); if (hub == NULL) { - jsonWriteStringf(jw, "error", "Can't connect to hub at '%s'", hubUrl); + jsonWriteStringf(jw, "error", "YOWSA ! Can't connect to hub at '%s'", hubUrl); return; } struct dbDb *dbDbList = trackHubGetDbDbs(hub->name); dbOptions = trackHubDbDbToValueLabel(dbDbList); safecpy(genomeLabel, sizeof(genomeLabel), hub->shortLabel); jsonWriteString(jw, "hubUrl", hubUrl); } - else - { - dbOptions = hGetDbOptionsForGenome(trackHubSkipHubName(genome)); - safecpy(genomeLabel, sizeof(genomeLabel), genome); - } jsonWriteValueLabelList(jw, "dbOptions", dbOptions); jsonWriteString(jw, "genomeLabel", genomeLabel); jsonWriteString(jw, "position", position); char *suggestTrack = NULL; if (! trackHubDatabase(db) && (sqlMayConnect(db) != NULL)) suggestTrack = assemblyGeneSuggestTrack(db); jsonWriteString(jw, "suggestTrack", suggestTrack); char *description = maybeGetDescriptionText(db); jsonWriteString(jw, "description", description); listAssemblyHubs(jw); } } static void setTaxId(struct cartJson *cj, struct hash *paramHash) /* Set db and genome according to taxId (and/or db) and return the info we'll need