b7bc2a330a4430adc400bac36a66701080382e47
jcasper
  Mon Aug 8 16:06:13 2016 -0700
Fixing links to Genetic Association Database (now archive-only), refs #15342

diff --git src/hg/hgGene/gad.c src/hg/hgGene/gad.c
index 7f6b6dc..8913892 100644
--- src/hg/hgGene/gad.c
+++ src/hg/hgGene/gad.c
@@ -38,85 +38,81 @@
 
 static void gadPrint(struct section *section, 
 	struct sqlConnection *conn, char *geneId)
 /* Print out GAD section. */
 {
 int refPrinted = 0;
 boolean showCompleteGadList;
 
 char query[1024];
 struct sqlResult *sr;
 char **row;
 struct dyString *currentCgiUrl;
 char *upperDisease;
 
 char *url = 
-cloneString("http://geneticassociationdb.nih.gov/cgi-bin/tableview.cgi?table=allview&cond=gene=");
+cloneString("http://geneticassociationdb.nih.gov");
 char *itemName;
 
 if (url != NULL && url[0] != 0)
     {
     sqlSafef(query, sizeof(query), "select k.geneSymbol from kgXref k, gadAll g"
 	" where k.kgId='%s' and k.geneSymbol = g.geneSymbol", geneId);
     itemName = sqlQuickString(conn, query);
     showCompleteGadList = FALSE;
     if (cgiOptionalString("showAllRef") != NULL)
     	{
         if (sameWord(cgiOptionalString("showAllRef"), "Y") ||
 	    sameWord(cgiOptionalString("showAllRef"), "y") )
 	    {
 	    showCompleteGadList = TRUE;
 	    }
 	}
     currentCgiUrl = cgiUrlString();
    
-    printf("<B>Genetic Association Database: ");
-    printf("<A HREF=\"%s'%s'\" target=_blank>", url, itemName);
+    printf("<B>Genetic Association Database (archive): ");
+    printf("<A HREF=\"%s\" target=_blank>", url);
     printf("%s</B></A>\n", itemName);
 
     printf("<BR><B>CDC HuGE Published Literature:  ");
     printf("<A HREF=\"%s%s%s\" target=_blank>", 
            "http://hugenavigator.net/HuGENavigator/searchSummary.do?firstQuery=",
            itemName, 
 	   "&publitSearchType=now&whichContinue=firststart&check=n&dbType=publit&Mysubmit=go");
     printf("%s</B></A>\n", itemName);
 
     /* List diseases associated with the gene */
     sqlSafef(query, sizeof(query),
     "select distinct broadPhen from gadAll where geneSymbol='%s' and association = 'Y' order by broadPhen",
     itemName);
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
     
     if (row != NULL) 
     	{
 	upperDisease = replaceChars(row[0], "'", "''");
 	touppers(upperDisease);
 	printf("<BR><B>Positive Disease Associations:  </B>");
-	printf("<A HREF=\"%s%s%s%s%s\" target=_blank>",
-	"http://geneticassociationdb.nih.gov/cgi-bin/tableview.cgi?table=allview&cond=upper(DISEASE)%20like%20'%25",
-	cgiEncode(upperDisease), "%25'%20AND%20upper(GENE)%20%20like%20'%25", itemName, "%25'");
+	printf("<A HREF=\"http://geneticassociationdb.nih.gov\" target=_blank>");
 	printf("%s</B></A>\n", row[0]);
         row = sqlNextRow(sr);
     	}
     while (row != NULL)
         {
 	upperDisease = replaceChars(row[0], "'", "''");
 	touppers(upperDisease);
-	printf(", <A HREF=\"%s%s%s%s%s\" target=_blank>",
-	"http://geneticassociationdb.nih.gov/cgi-bin/tableview.cgi?table=allview&cond=upper(DISEASE)%20like%20'%25",
-	cgiEncode(upperDisease), "%25'%20AND%20upper(GENE)%20%20like%20'%25", itemName, "%25'");
+	printf(", <A HREF=\"http://geneticassociationdb.nih.gov\" target=_blank>");
 	printf("%s</B></A>\n", row[0]);
         row = sqlNextRow(sr);
 	}
     sqlFreeResult(&sr);
 
     refPrinted = 0;
     sqlSafef(query, sizeof(query), 
        "select broadPhen,reference,title,journal, pubMed, conclusion from gadAll where geneSymbol='%s' and association = 'Y' order by broadPhen",
        itemName);
     sr = sqlMustGetResult(conn, query);
     row = sqlNextRow(sr);
     
     if (row != NULL) printf("<BR><B>Related Studies: </B><OL>");
     while (row != NULL)
         {