e98a03f6931a9dcf873c2228f5aa880707b9dac6
galt
Wed Jul 16 15:46:53 2014 -0700
fixing links for non-top-level sites
diff --git src/hg/lib/web.c src/hg/lib/web.c
index 8eedbf4..d74b15c 100644
--- src/hg/lib/web.c
+++ src/hg/lib/web.c
@@ -1159,35 +1159,35 @@
// Free up all that extra memory
dyStringFree(&realFileName);
dyStringFree(&fullDirName);
char *linkFull = dyStringCannibalize(&linkWithTimestamp);
char *link = linkFull;
if (docRoot != NULL)
{
link = cloneString(linkFull + strlen(docRoot) + 1);
freeMem(linkFull);
}
if (wrapInHtml) // wrapped for christmas
{
struct dyString *wrapped = dyStringNew(0);
if (js)
- dyStringPrintf(wrapped,"\n", link);
+ dyStringPrintf(wrapped,"\n", link);
else if (style)
- dyStringPrintf(wrapped,"\n", link);
+ dyStringPrintf(wrapped,"\n", link);
else // Will be image, since these are the only three choices allowed
- dyStringPrintf(wrapped,"\n", link);
+ dyStringPrintf(wrapped,"\n", link);
freeMem(link);
link = dyStringCannibalize(&wrapped);
}
return link;
}
char *webTimeStampedLinkToResourceOnFirstCall(char *fileName, boolean wrapInHtml)
// If this is the first call, will return full path of timestamped link to the requested
// resource file (js, or css). Free after use.
// else returns NULL. Useful to ensure multiple references to the same resource file are not made
// NOTE: png, jpg and gif should also be supported but are untested.
{
static struct hash *includedResourceFiles = NULL;
if (!includedResourceFiles)