e24258cb9af339295d713ab060cadcb284d2cb20
lrnassar
  Thu Jul 16 18:05:51 2026 -0700
Add db= to three more link builders found in QA follow-up. refs #37840

QA (Gerardo) found the "Go to <track> track controls" link on hgc feature
pages still lacked db=; a completeness sweep of every hTrackUiForTrack caller
turned up two more of the same idiom. Add the current-assembly db= to:
hgc.c printTrackUiLink() (rendered via printTrackHtml on most hgc detail
pages), lib/hui.c the related-tracks link, and lib/barChartUi.c the second
isPopup "Change" link in barChartCfgUiSelectEachBar (twin of the one already
fixed in barChartFacetedUi).

diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index 15c7a86ea70..a99485e8b78 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -3657,33 +3657,33 @@
 	   "&hgta_table=%s&position=%s:%d-%d&"
            "hgta_doSchema=describe+table+schema\" target=ucscSchema title='Open schema in new window'>"
 	   "View table schema</A></P>\n",
 	   database, tdb->grp, trackTable, tdb->table,
 	   seqName, winStart+1, winEnd);
     }
 }
 
 void printTrackUiLink(struct trackDb *tdb)
 /* Make link to hgTrackUi. */
 {
 char *trackName = getParentTrackName(tdb);
 struct trackDb *parentTdb = tdb;
 if (!sameString(trackName, tdb->track))
     parentTdb = hTrackDbForTrack(database, trackName);
-printf("<P><A HREF=\"%s?g=%s&%s\">"
+printf("<P><A HREF=\"%s?db=%s&g=%s&%s\">"
        "Go to %s track controls</A></P>\n",
-       hTrackUiForTrack(tdb->track), trackName, cartSidUrlString(cart), parentTdb->shortLabel);
+       hTrackUiForTrack(tdb->track), database, trackName, cartSidUrlString(cart), parentTdb->shortLabel);
 }
 
 void printDataRestrictionDate(struct trackDb *tdb)
 /* If this annotation has a dateUnrestricted trackDb setting, print it */
 {
 char *restrictionDate = encodeRestrictionDateDisplay(database,tdb);
 if (restrictionDate != NULL)
     {
     printf("<A HREF=\"/ENCODE/terms.html\" TARGET=_BLANK><B>Restricted until</A>:</B> %s <BR>\n",
                 restrictionDate);
     freeMem(restrictionDate);
     }
 }
 
 static void printOrigAssembly(struct trackDb *tdb)