2d9d194b4bb0e2ec25ca1d45739fdd418632dbb8 lrnassar Wed Jul 8 13:53:54 2026 -0700 Add db= to same-CGI self-links in hgTrackUi and hgc. refs #37840 Extends #37840 to same-CGI links that omitted db= and relied on the cart db, which still broke as shared, bookmarked, or search-indexed URLs. In hgTrackUi adds db to the superTrack member list, container-configure, description, sibling-track, duplicate/unduplicate, and quickLift-remove links. In hgc adds the current assembly's db to the shared anchor helpers (hgcAnchorSomewhereExt, hgcAnchorPosition, hgcAnchorWindow, hgcAnchorTranslatedChain, hgcAnchorPseudoGene), covering all their callers, plus the getDna, htcExtSeq, refGene, stsMap, cutter, cgapSage, mgc, peakClusters, regMotif, and pubs links. The foreign-assembly variant hgcAnchorSomewhereDb and the db2=/qlSourceDb= params are left untouched. diff --git src/hg/hgc/regMotif.c src/hg/hgc/regMotif.c index 1b9d65eb68e..53cb5677797 100644 --- src/hg/hgc/regMotif.c +++ src/hg/hgc/regMotif.c @@ -296,30 +296,31 @@ printf("&hgg_start=%d", gp->txStart); printf("&hgg_end=%d", gp->txEnd); printf("\">"); printf("%s", label); printf("</A>"); } else printf("%s", label); sqlFreeResult(&sr); } static void transRegCodeAnchor(struct transRegCode *trc) /* Print anchor to transRegCode details page. */ { printf("<A HREF=\"../cgi-bin/hgc?%s", cartSidUrlString(cart)); +printf("&db=%s", database); printf("&g=transRegCode"); printf("&i=%s", trc->name); printf("&o=%d", trc->chromStart); printf("&c=%s", trc->chrom); printf("\">"); } static void sacCerHgGeneLinkName(struct sqlConnection *conn, char *name) /* Wrap link to hgGene if possible around yeast gene name. */ { char query[256]; char *orf; sqlSafef(query, sizeof(query), "select name from sgdToName where value = '%s'", name); orf = sqlQuickString(conn, query);