c20579fc7c537c1736650125c5d264357d2cfa78 angie Mon Sep 18 13:15:16 2017 -0700 Big search & replace: use https instead of http for NCBI URLs. refs #17793 diff --git src/hg/hgc/geneReviewsClick.c src/hg/hgc/geneReviewsClick.c index 4be3578..65708c4 100644 --- src/hg/hgc/geneReviewsClick.c +++ src/hg/hgc/geneReviewsClick.c @@ -1,117 +1,117 @@ /* geneReviewsClick - hgc code to display geneReviews track item detail page */ /* Copyright (C) 2014 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "hgc.h" #include "geneReviewsClick.h" void doGeneReviews(struct trackDb *tdb, char *itemName) /* generate the detail page for geneReviews */ { struct sqlConnection *conn = hAllocConn(database); //char *table = tdb->table; int start = cartInt(cart, "o"); int num = 4; genericHeader(tdb, itemName); genericBedClick(conn, tdb, itemName, start, num); prGeneReviews(conn, itemName); printf("
"); printTrackHtml(tdb); hFreeConn(&conn); } void prGeneReviews(struct sqlConnection *conn, char *itemName) /* print GeneReviews associated to this item Note: this print function has been replaced by addGeneReviewToBed.pl which print the same information to the field 5 of bigBed file */ { struct sqlResult *sr; char **row; char query[512]; int i; char *clickMsg = "Click GR short name link to find the GeneReviews article on NCBI Bookshelf."; char *spacer = " "; boolean firstTime = TRUE; if (!sqlTableExists(conn, "geneReviewsDetail")) return; sqlSafef(query, sizeof(query), "select grShort, NBKid, grTitle from geneReviewsDetail where geneSymbol='%s'", itemName); sr = sqlGetResult(conn, query); while ((row = sqlNextRow(sr)) != NULL) { char *grShort = *row++; char *NBKid = *row++; char *grTitle = *row++; if (firstTime) { printf("
GeneReviews available for %s: (%s)
",itemName,clickMsg); firstTime = FALSE; printf("
");
               // #123456789-123456789-123456789-123456789-123456789-123456789-
           printf("GR short name          Disease name
"); printf("---------------------------------------------------------"); printf("--------------------
"); } - printf("%s", NBKid, grShort); + printf("%s", NBKid, grShort); if (strlen(grShort) <= 20) { for (i = 0; i < 20-strlen(grShort); i ++ ) { printf("%s", " " ); } } printf("%s%s
", spacer, grTitle); -// printf("%s%s%s
", NBKid, NBKid, spacer, grTitle); +// printf("%s%s%s
", NBKid, NBKid, spacer, grTitle); } /* end while */ printf("
"); sqlFreeResult(&sr); } /* end of prGeneReviews */ void prGRShortRefGene(char *itemName) /* print GeneReviews short label associated to this refGene item */ { struct sqlConnection *conn = hAllocConn(database); struct sqlResult *sr; char **row; char query[512]; boolean firstTime = TRUE; if (!sqlTableExists(conn, "geneReviewsDetail")) return; sqlSafef(query, sizeof(query), "select grShort, NBKid, grTitle from geneReviewsDetail where geneSymbol='%s'", itemName); sr = sqlGetResult(conn, query); while ((row = sqlNextRow(sr)) != NULL) { char *grShort = *row++; char *NBKid = *row++; char *grTitle = *row++; if (firstTime) { printf("Related GeneReviews disease(s): "); firstTime = FALSE; - printf("%s", NBKid, grShort); + printf("%s", NBKid, grShort); printf(" ("); printf("%s", grTitle); printf(")"); } else { printf(", "); - printf("%s", grShort, grShort); + printf("%s", grShort, grShort); printf(" ("); printf("%s", grTitle); printf(")"); } } printf("
"); sqlFreeResult(&sr); } /* end of prGRShortRefGene */