41d2156e26f92b1d30f313036eb46df6c0d6f2b4 max Mon Jul 27 05:36:55 2015 -0700 adding a $returnUrl option to the extTools.ra file, refs #15113 diff --git src/hg/hgTracks/extTools.c src/hg/hgTracks/extTools.c index ab95586..946571b 100644 --- src/hg/hgTracks/extTools.c +++ src/hg/hgTracks/extTools.c @@ -130,30 +130,37 @@ if (et->maxSize!=0 && len > et->maxSize) { printf("Sorry, this tool accepts only a sequence with less than %d base pairs
\n" "Try to zoom in some more.
\n", et->maxSize); return; } boolean submitDone = FALSE; for (slp=et->params; slp!=NULL; slp=slp->next) { char* val = slp->val; if (sameWord(val, "$db")) val = db; if (sameWord(val, "$position")) val = pos; + if (sameWord(val, "$returnUrl")) + { + char* host = getenv("HTTP_HOST"); + char* uri = getenv("REQUEST_URI"); + val = catTwoStrings(host, uri); + } + // half the current window size if (stringIn("$halfLen", val)) { char buf[64]; safef(buf, sizeof(buf), "%d", len/2); val = replaceChars(val, "$halfLen", buf); } if (sameWord(val, "$seq")) { static struct dnaSeq *seq = NULL; seq = hDnaFromSeq(db, chromName, winStart, winEnd, dnaLower); val = seq->dna; } // any remaining $-expression might be one of the general ones if (stringIn("$", val)) val = replaceInUrl(val, "", cart, db, chromName, winStart, winEnd, NULL, TRUE);