src/hg/hgTables/hgTables.c 1.174

1.174 2009/03/16 17:44:24 fanhsu
Added logic to disable other functions of TB (besides view table schema) for CGB servers.
Index: src/hg/hgTables/hgTables.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/hgTables.c,v
retrieving revision 1.173
retrieving revision 1.174
diff -b -B -U 4 -r1.173 -r1.174
--- src/hg/hgTables/hgTables.c	16 Mar 2009 05:08:48 -0000	1.173
+++ src/hg/hgTables/hgTables.c	16 Mar 2009 17:44:24 -0000	1.174
@@ -1533,9 +1533,20 @@
 /* Scan for 'do' variables and dispatch to appropriate page-generator.
  * By default head to the main page. */
 {
 struct hashEl *varList;
-if (cartVarExists(cart, hgtaDoTest))
+
+/* only allows view table schema function for CGB servers for the time being */
+if (hIsCgbServer())
+    {
+    if (cartVarExists(cart, hgtaDoSchema))
+    	doSchema(conn);
+    else
+	{
+	errAbort("Sorry, currently only the \"View Table Schema\" function of the Table Browser is available on this server.");
+	}
+    }
+else if (cartVarExists(cart, hgtaDoTest))
     doTest();
 else if (cartVarExists(cart, hgtaDoMainPage))
     doMainPage(conn);
 else if (cartVarExists(cart, hgtaDoSchema))