70d8c69d81dc54e30098322d24402f13daf5ecde
galt
  Wed Jan 16 17:00:53 2013 -0800
added support for database-based GUI menu items in Mirror menu. also added support for hg.conf browser.geoSuffix for testing. got rid of unneeded javascript in globalNav.inc and put C code instead into geoMirror.c
diff --git src/hg/hgGateway/hgGateway.c src/hg/hgGateway/hgGateway.c
index ca40dac..ad767e5 100644
--- src/hg/hgGateway/hgGateway.c
+++ src/hg/hgGateway/hgGateway.c
@@ -289,32 +289,33 @@
     char *redirect = cgiOptionalString("redirect");
 
     fprintf(stderr, "GALT redirectCookie=%s redirect=%s\n", 
             redirectCookie, redirect); fflush(stderr); // DEBUG REMOVE
 
     if (redirect == NULL && redirectCookie == NULL)
         {
         int thisNode = sqlUnsigned(thisNodeStr);
         struct sqlConnection *centralConn = hConnectCentral();
         char *ipStr = cgiRemoteAddr();
         int node = defaultNode(centralConn, ipStr);
 
         // get location of redirect node
         if (thisNode != node)
             {
+	    char *geoSuffix = cfgOptionDefault("browser.geoSuffix","");
             char query[1056];
-            safef(query, sizeof query, "select domain from gbNode where node = %d", node);
+            safef(query, sizeof query, "select domain from gbNode%s where node = %d", geoSuffix, node);
             char *newDomain = sqlQuickString(centralConn, query);
             fprintf(stderr, "GALT newDomain=%s\n", newDomain); fflush(stderr); // DEBUG REMOVE
             char *oldDomain = cgiServerName();
             char *port = cgiServerPort();
             char *uri = cgiRequestUri();
             char *sep = strchr(uri, '?') ? "&" : "?";
             int newUriSize = strlen(uri) + 1024;
             char *newUri = needMem(newUriSize);
             // TODO what about https?
             safef(newUri, newUriSize, "http://%s:%s%s%sredirect=auto&source=%s", newDomain, port, uri, sep, oldDomain);
             struct dyString *dy = dyStringNew(256);
             dyStringPrintf(dy,
                            "HTTP/1.1 302 found: \n"
                            "Content-Type: text/html; charset=iso-8859-1\n"
                            "Connection: close\n"