eedebe426788d2f80ffdbecf10e41e865e2993e1
kate
  Thu Nov 1 12:06:43 2012 -0700
Use hg.conf browser.node setting to distinguish GEO mirrors.  #7477
diff --git src/hg/lib/web.c src/hg/lib/web.c
index 95cb434..36f883c 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -211,31 +211,38 @@
 	puts("<IMG SRC=\"../images/encodeDcc.jpg\" ALT=\"ENCODE Project at UCSC\">");
 	}
     else
 	{
 	puts("<IMG SRC=\"../images/title.jpg\">");
 	}
     puts("</TH></TR>" "\n"
          "" "\n" );
     }
 
 /* Put up the hot links bar. */
 
 char *menuStr = menuBar(theCart);
 if(menuStr)
     {
+    // NOTE: this jsInclude may be gratuitous (menuBar does it already).  Ask Larry...
     jsIncludeFile("jquery.js", NULL);
+    if (geoMirrorEnabled())
+        {
+        // notify client to provide Geo mirror functionality (e.g. in nav bar)
+        printf("<script type='text/javascript'>var GB_geoMirror = %d;</script>\n", 
+                sqlUnsigned(geoMirrorNode()));
+        }
     puts(menuStr);
     }
 
 if (endsWith(scriptName, "hgGateway") && geoMirrorEnabled())
     {
     // Show an opt-out alert if user is on a host to which user has been automatically redirected (just once, right after they have been redirected)
     char *source = cgiOptionalString("source");
     char *redirect = cgiOptionalString("redirect");
     if (source != NULL && redirect != NULL && sameString(redirect, "auto"))
 	{
 	char *domain = cgiServerName();
 	char *port = cgiServerPort();
         // We don't bother maintaining stuff in request URI, because it may contain items like hgsid and other host specific values
         int newUriSize = 2048;
 	char *newUri = needMem(newUriSize);