src/hg/hgc/hgc.c 1.1511

1.1511 2009/02/28 00:06:51 angie
Made dbIsFound a global so there's no need to set it again after doMiddle sets it.
Index: src/hg/hgc/hgc.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgc/hgc.c,v
retrieving revision 1.1510
retrieving revision 1.1511
diff -b -B -U 4 -r1.1510 -r1.1511
--- src/hg/hgc/hgc.c	27 Feb 2009 19:05:15 -0000	1.1510
+++ src/hg/hgc/hgc.c	28 Feb 2009 00:06:51 -0000	1.1511
@@ -277,8 +277,11 @@
 
 /* initialized by getCtList() if necessary: */
 struct customTrack *theCtList = NULL;
 
+/* getDNA stuff actually works when the database doesn't exist! */
+boolean dbIsFound = FALSE;
+
 /* forwards */
 char *getPredMRnaProtSeq(struct genePred *gp);
 void doAltGraphXDetails(struct trackDb *tdb, char *item);
 
@@ -3590,9 +3593,8 @@
 struct hTableInfo *hti = NULL;
 char *tbl = cgiUsualString("table", "");
 char rootName[256];
 char parsedChrom[32];
-boolean dbIsFound = sqlDatabaseExists(database);
 if (dbIsFound)
     {
     hParseTableName(database, tbl, rootName, parsedChrom);
     hti = hFindTableInfo(database, seqName, rootName);
@@ -3638,9 +3640,9 @@
 if (dbIsFound)
     cgiMakeButton("submit", EXTENDED_DNA_BUTTON);
 puts("</FORM><P>");
 if (dbIsFound)
-puts("Note: The \"Mask repeats\" option applies only to \"get DNA\", not to \"extended case/color options\". <P>");
+    puts("Note: The \"Mask repeats\" option applies only to \"get DNA\", not to \"extended case/color options\". <P>");
 }
 
 boolean dnaIgnoreTrack(char *track)
 /* Return TRUE if this is one of the tracks too boring
@@ -4107,9 +4109,8 @@
 char *pos = NULL;
 char *chrom = NULL;
 int start = 0;
 int end = 0;
-boolean dbIsFound = sqlDatabaseExists(database);
 
 if (sameString(action, EXTENDED_DNA_BUTTON))
     {
     doGetDnaExtended1();
@@ -20804,9 +20805,9 @@
 
 protDbName = hPdbFromGdb(database);
 protDbConn = sqlConnect(protDbName);
 
-boolean dbIsFound = sqlDatabaseExists(database);
+dbIsFound = sqlDatabaseExists(database);
 
 if (dbIsFound)
     seqName = hgOfficialChromName(database, cartString(cart, "c"));
 else