81881fe298580da38c5bdb7764c05c03ec278b97
hiram
Fri Jan 4 11:54:10 2013 -0800
adding cgiExitTime stderr printout to CGI binaries for apache error_log information
diff --git src/hg/hgFileUi/hgFileUi.c src/hg/hgFileUi/hgFileUi.c
index 2a10913..0623946 100644
--- src/hg/hgFileUi/hgFileUi.c
+++ src/hg/hgFileUi/hgFileUi.c
@@ -1,177 +1,179 @@
#include "common.h"
#include "hash.h"
#include "cheapcgi.h"
#include "htmshell.h"
#include "jsHelper.h"
#include "trackDb.h"
#include "hdb.h"
#include "web.h"
#include "mdb.h"
#include "hCommon.h"
#include "hui.h"
#include "fileUi.h"
#define MAIN_FORM "mainForm"
#define WIGGLE_HELP_PAGE "../goldenPath/help/hgWiggleTrackHelp.html"
void fileUi(struct cart *cart,struct trackDb *tdb, char *db, char *chrom, boolean ajax)
// Downloadable Files UI
{
if (!ajax)
{
jsIncludeFile("jquery.js", NULL);
webIncludeResourceFile("jquery-ui.css");
jsIncludeFile("jquery-ui.js", NULL);
jsIncludeFile("utils.js",NULL);
}
// QUESTION: Is this needed? Are we doing a submit on hgTrackUi to get here?? Probably not.
//if(tdbIsContainer(tdb) && !ajax)
// cartTdbTreeReshapeIfNeeded(cart,tdb);
if (trackDbSetting(tdb, "wgEncode"))
{
printf("");
}
printf("%s\n", tdb->longLabel);
// If Composite, link to the hgTrackUi. But if downloadsOnly then link to any superTrack.
#define LINK_TO_PARENT "%s(
%s)\n"
if (tdbIsComposite(tdb))
{
char *encodedTrackName = cgiEncode(tdb->track);
printf(LINK_TO_PARENT," ", hgTrackUiName(), cartSessionVarName(),
cartSessionId(cart), chrom, encodedTrackName,tdb->shortLabel,"Track settings");
freeMem(encodedTrackName);
}
else if (tdb->parent) //Print link for parent track
{
char *encodedTrackName = cgiEncode(tdb->parent->track);
printf(LINK_TO_PARENT," ", hgTrackUiName(), cartSessionVarName(),
cartSessionId(cart), chrom, encodedTrackName, tdb->parent->shortLabel,
tdb->parent->shortLabel);
freeMem(encodedTrackName);
}
// NAVLINKS - Link to Description down below
if (tdb->html != NULL && tdb->html[0] != 0)
{
printf(" ");
}
puts("
");
filesDownloadUi(db,cart,tdb);
// Print data version trackDB setting, if any */
char *version = trackDbSetting(tdb, "dataVersion");
if (version)
{
cgiDown(0.7);
printf("Data version: %s
\n", version);
}
// Print lift information from trackDb, if any
(void) trackDbPrintOrigAssembly(tdb, db);
if (tdb->html != NULL && tdb->html[0] != 0)
{
char *browserVersion;
if (btIE == cgiClientBrowser(&browserVersion, NULL, NULL) && *browserVersion < '8')
htmlHorizontalLine();
else // Move line down, since Description (in ->html) is proceded by too much space
printf("
");
printf("