381da604707a65b902707c2f86af896d1a7369e5
angie
  Wed Jul 6 15:03:24 2016 -0700
Adding back support for hg.conf settings survey and surveyLabel to hgGateway.

diff --git src/hg/hgGateway/hgGateway.c src/hg/hgGateway/hgGateway.c
index 3b42f50..087da55 100644
--- src/hg/hgGateway/hgGateway.c
+++ src/hg/hgGateway/hgGateway.c
@@ -315,38 +315,50 @@
     puts(WARNING_BOX_START
          "WARNING: This is the UCSC Genome Browser development site. "
          "This website is used for testing purposes only and is not intended for general public "
          "use. "
          UNDER_DEV
          MAIN_SITE
          WARNING_BOX_END);
     }
 
 // The visible page elements are all in ./hgGateway.html, which is transformed into a quoted .h
 // file containing a string constant that we #include and print here (see makefile).
 puts(
 #include "hgGateway.html.h"
 );
 
-// Set global JS variables hgsid and activeGenomes
+// Set global JS variables hgsid, activeGenomes, surveyLink and surveyLabel at page load time
 // We can't just use "var hgsid = " or the other scripts won't see it -- it has to be
 // "window.hgsid = ".
 puts("<script>");
 printf("window.%s = '%s';\n", cartSessionVarName(), cartSessionId(cart));
 puts("window.activeGenomes =");
 printActiveGenomes();
 puts(";");
+char *surveyLink = cfgOption("survey");
+if (isNotEmpty(surveyLink))
+    {
+    char *surveyLabel = cfgOptionDefault("surveyLabel", "Please take our survey");
+    printf("window.surveyLink=\"%s\";\n", jsonStringEscape(surveyLink));
+    printf("window.surveyLabel=\"%s\";\n", jsonStringEscape(surveyLabel));
+    }
+else
+    {
+    puts("window.surveyLink=null;");
+    puts("window.surveyLabel=null;");
+    }
 puts("</script>");
 
 puts("<script src=\"../js/es5-shim.4.0.3.min.js\"></script>");
 puts("<script src=\"../js/es5-sham.4.0.3.min.js\"></script>");
 puts("<script src=\"../js/lodash.3.10.0.compat.min.js\"></script>");
 puts("<script src=\"../js/cart.js\"></script>");
 
 webIncludeResourceFile("jquery-ui.css");
 jsIncludeFile("jquery-ui.js", NULL);
 jsIncludeFile("jquery.watermarkinput.js", NULL);
 jsIncludeFile("utils.js",NULL);
 
 // Phylogenetic tree .js file, produced by dbDbTaxonomy.pl:
 char *dbDbTree = cfgOptionDefault("hgGateway.dbDbTaxonomy", "../js/dbDbTaxonomy.js");
 if (isNotEmpty(dbDbTree))