2ba572dc8bbe18b3398dcf17205dafdd52ab396a braney Sat May 24 10:01:21 2014 -0700 updates to hgHubConnect to interface to make it less confusing. Nowconnection and disconnection put you on the gateway page. diff --git src/hg/lib/cart.c src/hg/lib/cart.c index f13d17d..eb51d7c 100644 --- src/hg/lib/cart.c +++ src/hg/lib/cart.c @@ -606,30 +606,44 @@ { struct cart *cart = cartOfNothing(); cart->userId = userId; cart->sessionId = sessionId; loadCgiOverHash(cart, oldVars); if (exclude != NULL) { char *ex; while ((ex = *exclude++)) cartExclude(cart, ex); } return cart; } +static void doDisconnectHub(struct cart *cart) +{ +char *id = cartOptionalString(cart, "hubId"); + +if (id != NULL) + { + char buffer[1024]; + safef(buffer, sizeof buffer, "hgHubConnect.hub.%s", id); + cartRemove(cart, buffer); + } + +cartRemove(cart, "hubId"); +} + struct cart *cartNew(char *userId, char *sessionId, char **exclude, struct hash *oldVars) /* Load up cart from user & session id's. Exclude is a null-terminated list of * strings to not include */ { cgiApoptosisSetup(); struct cart *cart; struct sqlConnection *conn = cartDefaultConnector(); char *ex; boolean userIdFound = FALSE, sessionIdFound = FALSE; AllocVar(cart); cart->hash = newHash(12); cart->exclude = newHash(7); cart->userId = userId; @@ -668,30 +682,34 @@ } else if (cartVarExists(cart, hgsDoLoadUrl)) { setUdcCacheDir(); char *url = cartString(cart, hgsLoadUrlName); struct lineFile *lf = netLineFileOpen(url); cartLoadSettings(lf, cart, oldVars, hgsDoLoadUrl); lineFileClose(&lf); cartTrace(cart, "after cartLS", conn); } } #endif /* GBROWSE */ /* wire up the assembly hubs so we can operate without sql */ setUdcTimeout(cart); +if (cartVarExists(cart, hgHubDoDisconnect)) + { + doDisconnectHub(cart); + } hubConnectLoadHubs(cart); if (exclude != NULL) { while ((ex = *exclude++)) cartExclude(cart, ex); } cartDefaultDisconnector(&conn); return cart; } static void updateOne(struct sqlConnection *conn,