4886584b86a25443a2bd4b5d2816001775f9cab5
braney
  Fri Sep 16 17:04:22 2011 -0700
don't show myHubs that don't support the current assembly #5253
diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c
index 9da4f97..0a7e78f 100644
--- src/hg/hgHubConnect/hgHubConnect.c
+++ src/hg/hgHubConnect/hgHubConnect.c
@@ -64,62 +64,62 @@
 	"<th colspan=\"5\" id=\"addHubBar\"><label>URL:</label> "
 	"<input name=\"hubText\" id=\"hubUrl\" class=\"hubField\""
 	    "type=\"text\" size=\"65\"> "
 	"<input name=\"hubAddButton\""
 	    "onClick=\"document.addHubForm.elements['hubUrl'].value=hubText.value;"
 		"document.addHubForm.submit();return true;\" "
 		"class=\"hubField\" type=\"button\" value=\"Add Hub\">"
 	"</th> "
     "</tr> ");
 
 // count up the number of unlisted hubs we currently have
 int count = 0;
 struct hubConnectStatus *hub, *hubList =  hubConnectStatusListFromCartAll(cart);
 for(hub = hubList; hub; hub = hub->next)
     {
-    if (isHubUnlisted(hub))
+    if (isHubUnlisted(hub) && hubHasDatabase(hub, database) )
 	count++;
     }
 
 if (count == 0)
     {
     // nothing to see here
     printf(
 	"<tr><td>No Track Hubs for this genome assembly</td></tr>"
 	"</td></table>");
     printf("</thead></div>");
     return;
     }
 
 // time to output the big table.  First the header
 printf(
     "<tr> "
 	"<th>Display</th> "
 	"<th>Hub Name</th> "
 	"<th>Description</th> "
 	"<th>URL</th> "
 	"<th>Disconnect</th> "
     "</tr></thead>\n");
 
 // start first row
 printf("<tbody><tr>");
 
 count = 0;
 for(hub = hubList; hub; hub = hub->next)
     {
     /* if the hub is public, then don't list it here */
-    if (!isHubUnlisted(hub))
+    if (!(isHubUnlisted(hub) && hubHasDatabase(hub, database) ))
 	continue;
 
     if (count)
 	webPrintLinkTableNewRow();  // ends last row and starts a new one
     count++;
 
     // if there's an error message, we don't let people select it
     if (isEmpty(hub->errorMessage))
 	{
 	ourCellStart();
 	char hubName[32];
 	safef(hubName, sizeof(hubName), "%s%u", hgHubConnectHubVarPrefix, hub->id);
 	cartMakeCheckBox(cart, hubName, FALSE);
 	ourCellEnd();
 	}