2c925794c53b18f05b37e8f1ff2b0493b440289f
galt
  Thu Dec 4 13:12:34 2014 -0800
Fixes #14173. Enables more sophisticated link to table browser from hgGene, hgc, and hgTrackUi, if the table exists and is not a custom track, then hgTables will launch with the table automatically selected.  We are really just restoring functionality that we used to have -- and which got nuked when we were simplifying and unifying our menus and adding submenus a few years ago.
diff --git src/hg/hgTracks/menu.c src/hg/hgTracks/menu.c
index a56cc99..deaa91b 100644
--- src/hg/hgTracks/menu.c
+++ src/hg/hgTracks/menu.c
@@ -135,31 +135,31 @@
     }
 agpFragFree(&agpItem);  // the one we maybe used
 }
 
 void printMenuBar()
 /* Put up the menu bar. */
 {
 struct hotLink *link, *links = NULL;
 int i, len;
 struct sqlConnection *conn = NULL;
 if (!trackHubDatabase(database))
     conn = hAllocConn(database);
 char *menuStr, buf[4096], uiVars[1024];
 safef(uiVars, sizeof(uiVars), "%s=%s", cartSessionVarName(), cartSessionId(cart));
 
-menuStr = menuBar(cart);
+menuStr = menuBar(cart, database);
 
 // Create top items in view menu
 safef(buf, sizeof(buf), "../cgi-bin/hgTracks?%s&hgt.psOutput=on", uiVars);
 appendLink(&links, buf, "PDF/PS", "pdfLink", FALSE);
 safef(buf, sizeof(buf), "%s&o=%d&g=getDna&i=mixed&c=%s&l=%d&r=%d&db=%s&%s",
       hgcNameAndSettings(), winStart, chromName, winStart, winEnd, database, uiVars);
 appendLink(&links, buf, "DNA", "dnaLink", FALSE);
 safef(buf, sizeof(buf), "../cgi-bin/hgConvert?hgsid=%s&db=%s", cartSessionId(cart), database);
 appendLink(&links, buf, "in other Genomes (Convert)", "convertMenuLink", FALSE);
 
 // Add link-outs to other dbs as appropriate for this assembly
 if (differentWord(database,"susScr2"))
     {
     /* Print Ensembl anchor for latest assembly of organisms we have
      * supported by Ensembl == if versionString from trackVersion exists */