src/hg/lib/hui.c 1.216

1.216 2009/06/25 05:34:41 markd
added suppot for downloadsServer variable in html
Index: src/hg/lib/hui.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/hui.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -b -B -U 4 -r1.215 -r1.216
--- src/hg/lib/hui.c	25 Jun 2009 00:05:51 -0000	1.215
+++ src/hg/lib/hui.c	25 Jun 2009 05:34:41 -0000	1.216
@@ -45,9 +45,9 @@
 // Downloads directory if this is ENCODE
 if(trackDbSetting(tdb, "wgEncode") != NULL)
     {
     printf("<A HREF=\"http://%s/goldenPath/%s/%s/%s/\" title='Open dowloads directory in a new window' TARGET=ucscDownloads>%s</A>",
-            cfgOptionDefault("downloads.server", "hgdownload.cse.ucsc.edu"),
+            hDownloadsServer(),
             trackDbSettingOrDefault(tdb, "origAssembly","hg18"),
             ENCODE_DCC_DOWNLOADS,
             tdb->tableName,name);
     return TRUE;
@@ -163,8 +163,14 @@
 else
     return cfgOptionDefault("central.cookie", "hguid");
 }
 
+char *hDownloadsServer()
+/* get the downloads server from hg.conf or the default */
+{
+return cfgOptionDefault("downloads.server", "hgdownload.cse.ucsc.edu");
+}
+
 void setUdcCacheDir()
 /* set the path to the udc cache dir */
 {
 udcSetDefaultDir(cfgOptionDefault("udc.cacheDir", udcDefaultDir()));