abaf0c7fca09364bf38dfbdcf2c49e910b3b01f6
braney
  Sat Aug 16 10:56:58 2025 -0700
ongoing work on quickLift

diff --git src/hg/lib/hubConnect.c src/hg/lib/hubConnect.c
index e226db5d36f..22391ca82c5 100644
--- src/hg/lib/hubConnect.c
+++ src/hg/lib/hubConnect.c
@@ -295,30 +295,40 @@
         continue;
 
     int id = hubIdFromCartName(pair->name);
     hub = hubConnectStatusForId(conn, id);
     if (hub != NULL)
 	{
         slAddHead(&hubList, hub);
 	}
     }
 slFreeList(&pairList);
 hDisconnectCentral(&conn);
 slReverse(&hubList);
 return hubList;
 }
 
+void removeQuickListReference(struct cart *cart, unsigned hubId, char *toDb)
+{
+// for now we're deleting quickLifted ups that aren't to the current datbase
+char buffer[4096];
+
+safef(buffer, sizeof buffer, "quickLift.%d.%s", hubId, toDb);
+cartRemove(cart, buffer);
+cartSetString(cart, hgHubConnectRemakeTrackHub, "on");
+}
+
 struct hubConnectStatus *hubConnectStatusListFromCart(struct cart *cart, char *db)
 /* Return list of track hubs that are turned on by user in cart. */
 {
 struct hubConnectStatus *hubList = NULL;
 struct slName *name, *nameList = hubConnectHubsInCart(cart);
 struct sqlConnection *conn = hConnectCentral();
 for (name = nameList; name != NULL; name = name->next)
     {
     // items in trackHub statement may need to be quickLifted.  This is implied
     // by the hubStatus id followed by a colon and then a index into the quickLiftChain table
     struct hubConnectStatus *hub = NULL;
     char *copy = cloneString(name->name);
     char *colon = strchr(copy, ':');
     if (colon)
         *colon++ = 0;
@@ -332,41 +342,32 @@
         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);
 
         // don't load quickLift hubs that aren't for us
-        if ((db == NULL) || sameOk(toDb, hubConnectSkipHubPrefix(db)))
+        //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);
 	}
     }