60299df8e9a20777d14db989a819c80c6a62de85 kent Wed Mar 9 12:36:19 2011 -0800 Adding hgBotDelay call to hgGene to avoid bot damage like we got yesterday. diff --git src/hg/hgGene/hgGene.c src/hg/hgGene/hgGene.c index de8c290..6d2c022 100644 --- src/hg/hgGene/hgGene.c +++ src/hg/hgGene/hgGene.c @@ -1,29 +1,30 @@ /* hgGene - A CGI script to display the gene details page.. */ #include "common.h" #include "hCommon.h" #include "linefile.h" #include "hash.h" #include "dystring.h" #include "jksql.h" #include "cheapcgi.h" #include "htmshell.h" #include "cart.h" #include "hui.h" #include "dbDb.h" #include "hdb.h" #include "web.h" +#include "botDelay.h" #include "ra.h" #include "spDb.h" #include "genePred.h" #include "hgColors.h" #include "hgGene.h" static char const rcsid[] = "$Id: hgGene.c,v 1.119 2010/02/23 23:03:37 kent Exp $"; /* ---- Global variables. ---- */ struct cart *cart; /* This holds cgi and other variables between clicks. */ struct hash *oldVars; /* Old cart hash. */ char *database; /* Name of genome database - hg15, mm3, or the like. */ char *genome; /* Name of genome - mouse, human, etc. */ char *curGeneId; /* Current Gene Id. */ char *curGeneName; /* Biological name of gene. */ @@ -615,30 +616,31 @@ void doKgMethod() /* display knownGene.html content (UCSC Known Genes * Method, Credits, and Data Use Restrictions) */ { cartWebStart(cart, database, "Methods, Credits, and Use Restrictions"); struct trackDb *tdb = hTrackDbForTrack(database, genomeSetting("knownGene")); hPrintf("%s", tdb->html); cartWebEnd(); } void cartMain(struct cart *theCart) /* We got the persistent/CGI variable cart. Now * set up the globals and make a web page. */ { +hgBotDelay(); cart = theCart; getDbAndGenome(cart, &database, &genome, oldVars); getGenomeSettings(); if (cartVarExists(cart, hggDoKgMethod)) doKgMethod(); else if (cartVarExists(cart, hggDoTxInfoDescription)) doTxInfoDescription(); else { struct sqlConnection *conn = NULL; char *geneName = cartUsualString(cart, hggGene, NULL); if (isEmpty(geneName)) { // Silly googlebots. hUserAbort("Error: the hgg_gene parameter is missing from the cart and the CGI params.");