94b156304077582efe7374b25e54c8f9bd08b166 braney Tue Jul 26 10:46:04 2011 -0700 disconnects from myHub just delete the cart variable, not the line in the hubStaus table diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 72c5281..1401f46 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -123,34 +123,34 @@ cartMakeCheckBox(cart, hubName, FALSE); ourCellEnd(); } else ourPrintCell("error"); ourPrintCell(hub->shortLabel); if (isEmpty(hub->errorMessage)) ourPrintCell(hub->longLabel); else ourPrintCell(hub->errorMessage); ourPrintCell(hub->hubUrl); ourCellStart(); printf( "" - , hub->hubUrl); + , hub->id); ourCellEnd(); } printf("\n"); cgiMakeButton("Submit", "Display Selected Hubs"); printf(""); } static void makeGenomePrint() /* print out the name of the current database etc. */ { getDbAndGenome(cart, &database, &organism, oldVars); printf("
clearing hub %s\n",url);
if (url != NULL)
hubClearStatus(url);
else
errAbort("must specify url in %s\n", hgHubDataText);
printf("Completed\n");
}
static void doDisconnectHub(struct cart *theCart)
{
-char *url = cartOptionalString(cart, hgHubDataText);
+char *id = cartOptionalString(cart, "hubId");
-if (url != NULL)
- hubDisconnect(theCart, url);
+if (id != NULL)
+ {
+ char buffer[1024];
+ safef(buffer, sizeof buffer, "hgHubConnect.hub.%s", id);
+ cartRemove(cart, buffer);
+ }
-cartRemove(theCart, hgHubDataText);
+cartRemove(theCart, "hubId");
}
void doMiddle(struct cart *theCart)
/* Write header and body of html page. */
{
cart = theCart;
setUdcCacheDir();
if (cartVarExists(cart, hgHubDoClear))
{
doClearHub(cart);
cartWebEnd();
return;
}
if (cartVarExists(cart, hgHubDoDisconnect))
@@ -305,31 +309,31 @@
// figure out and print out genome name
makeGenomePrint();
// check to see if we have any new hubs
boolean gotNew = hubCheckForNew(database, cart);
// here's a little form for the add new hub button
printf("");
// this the form for the disconnect hub button
printf("");
// ... and now the main form
printf("