641eea870f2748b7b858525790f896351a5b02c9
braney
  Wed Sep 16 14:35:20 2015 -0700
make the "genome" keyword result in the web code setting the position to the default position # no redmine

diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index 9952fd8..4614b11 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -757,33 +757,35 @@
 setUdcTimeout(cart);
 if (cartVarExists(cart, hgHubDoDisconnect))
     doDisconnectHub(cart);
 
 pushWarnHandler(cartHubWarn);
 char *newDatabase = hubConnectLoadHubs(cart);
 popWarnHandler();
 
 #ifndef GBROWSE
 if (didSessionLoad)
     cartCopyCustomTracks(cart);
 #endif /* GBROWSE */
 
 if (newDatabase != NULL)
     {
-    cartSetString(cart,"db", newDatabase);
     // this is some magic to use the defaultPosition */
-    cartSetString(cart,"position", "genome");
+    char *oldDb = cartOptionalString(cart, "db");
+    if (oldDb != NULL)
+        hashAdd(oldVars, "db", oldDb);
+    cartSetString(cart,"db", newDatabase);
     }
 
 if (exclude != NULL)
     {
     while ((ex = *exclude++))
 	cartExclude(cart, ex);
     }
 
 cartDefaultDisconnector(&conn);
 
 if (didSessionLoad)
     cartHideDefaultTracks(cart);
 return cart;
 }