84688c95e385ee526a59d7dac8f6ff644781361b braney Sat Aug 2 11:11:57 2025 -0700 ongoing work on quickLift. Made saved sessions work a little more rationally diff --git src/hg/lib/hubConnect.c src/hg/lib/hubConnect.c index 98f07c60183..e226db5d36f 100644 --- src/hg/lib/hubConnect.c +++ src/hg/lib/hubConnect.c @@ -331,34 +331,42 @@ sqlSafef(query, sizeof(query), "select fromDb, toDb, path from %s where id = \"%s\"", "quickLiftChain", colon); struct sqlResult *sr = sqlGetResult(conn, query); char **row; char *replaceDb = NULL; char *quickLiftChain = NULL; char *toDb = NULL; while ((row = sqlNextRow(sr)) != NULL) { replaceDb = cloneString(row[0]); toDb = cloneString(row[1]); quickLiftChain = cloneString(row[2]); break; // there's only one } sqlFreeResult(&sr); -// this line needs to be reintroduced somehow to prevent quickLift hubs from -// being loaded on the wrong database, but it depends on db being set, which it isn't always at this point -// if (sameOk(toDb, hubConnectSkipHubPrefix(db))) + // don't load quickLift hubs that aren't for us + if ((db == NULL) || sameOk(toDb, hubConnectSkipHubPrefix(db))) hub = hubConnectStatusForIdExt(conn, id, replaceDb, toDb, quickLiftChain); + else + { + // for now we're deleting quickLifted ups that aren't to the current datbase + char buffer[4096]; + + safef(buffer, sizeof buffer, "quickLift.%d.%s", id, toDb); + cartRemove(cart, buffer); + cartSetString(cart, hgHubConnectRemakeTrackHub, "on"); + } } if (hub != NULL) { if (!isEmpty(hub->errorMessage) && (strstr(hub->hubUrl, "hgComposite") != NULL)) { // custom collection hub has disappeared. Remove it from cart cartSetString(cart, hgHubConnectRemakeTrackHub, "on"); char buffer[1024]; safef(buffer, sizeof buffer, "hgHubConnect.hub.%d", id); cartRemove(cart, buffer); } else slAddHead(&hubList, hub); } }