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/peakClusters.c src/hg/hgc/peakClusters.c index 67c6a13a3fa..dc390946948 100644 --- src/hg/hgc/peakClusters.c +++ src/hg/hgc/peakClusters.c @@ -394,32 +394,32 @@ sqlRowCount(conn, queryTblSafe)); printf("<B>Cluster Score (out of 1000):</B> %d<BR>\n", cluster->score); printPos(cluster->chrom, cluster->chromStart, cluster->chromEnd, NULL, TRUE, NULL); /* In a new section put up list of hits. */ webNewSection("List of Items in Cluster"); webPrintLinkTableStart(); printClusterTableHeader(fieldList, FALSE, FALSE, TRUE); printPeakClusterInfo(tdb, cart, conn, inputTrackTable, fieldList, cluster); } else errAbort("Missing required trackDb setting %s for track %s", "inputTableFieldDisplay", tdb->track); webPrintLinkTableEnd(); } -printf("<A HREF=\"%s&g=htcListItemsAssayed&table=%s\" TARGET_blank>", hgcPathAndSettings(), - tdb->track); +printf("<A HREF=\"%s&db=%s&g=htcListItemsAssayed&table=%s\" TARGET_blank>", hgcPathAndSettings(), + database, tdb->track); printf("List all items assayed"); printf("</A><BR>\n"); webNewSection("Track Description"); printTrackHtml(tdb); hFreeConn(&conn); } void doClusterMotifDetails(struct sqlConnection *conn, struct trackDb *tdb, struct factorSource *cluster) /* Display details about TF binding motif(s) in cluster */ { char *motifTable = trackDbSetting(tdb, "motifTable"); // localizations char *motifPwmTable = trackDbSetting(tdb, "motifPwmTable"); // PWM used to draw sequence logo char *motifMapTable = trackDbSetting(tdb, "motifMapTable"); // map target to motif struct slName *motifNames = NULL, *mn; // list of canonical motifs for the factor