e50eb37345c15103c27e279de68e0837bf96d434 max Tue May 30 14:26:23 2017 -0700 fixing hgSession bug after my last change, refs #19430 diff --git src/hg/hgSession/hgSession.c src/hg/hgSession/hgSession.c index 376d8b8..b151f3c 100644 --- src/hg/hgSession/hgSession.c +++ src/hg/hgSession/hgSession.c @@ -132,54 +132,30 @@ } void showCartLinks() /* Print out links to cartDump and cartReset. */ { char *session = cartSidUrlString(cart); char returnAddress[512]; safef(returnAddress, sizeof(returnAddress), "%s?%s", hgSessionName(), session); printf("Click here to " "reset the browser user interface settings to their defaults.\n", session, cgiEncodeFull(returnAddress)); } - -char *destAppScriptName() -/* Return the complete path (/cgi-bin/... on our systems) of the destination - * CGI for share-able links. Currently hardcoded; there might be a way to - * offer the user a choice. */ -{ -static char *thePath = NULL; -if (thePath == NULL) - { - char path[512]; - char buf[512]; - char *ptr = NULL; - safef(path, sizeof(path), "%s", cgiScriptName()); - ptr = strrchr(path, '/'); - if (ptr == NULL) - path[0] = '\0'; - else - *(ptr+1) = '\0'; - safef(buf, sizeof(buf), "%s%s", path, "hgTracks"); - thePath = cloneString(buf); - } -return thePath; -} - void addSessionLink(struct dyString *dy, char *userName, char *sessionName, boolean encode) /* Add to dy an URL that tells hgSession to load a saved session. * If encode, cgiEncodeFull the URL. */ { struct dyString *dyTmp = dyStringNew(1024); dyStringPrintf(dyTmp, "%s%s?hgS_doOtherUser=submit&" "hgS_otherUserName=%s&hgS_otherUserSessionName=%s", wikiServerAndCgiDir(), "hgTracks", userName, sessionName); if (encode) { dyStringPrintf(dy, "%s", cgiEncodeFull(dyTmp->string)); } else { @@ -1284,31 +1260,31 @@ "compressed text in one of the formats offered in " "Save Settings.", fileName); } else { dyStringAppend(dyMessage, "Sorry, your web browser seems to have " "posted no data"); if (isNotEmpty(fileName)) dyStringPrintf(dyMessage, ", only the filename %s", fileName); dyStringAppend(dyMessage, ". Your settings have not been changed."); lf = NULL; } dyStringPrintf(dyMessage, "  " "Browser", - wikiServerAndCgiDir(), destAppScriptName(), + wikiServerAndCgiDir(), "hgTracks", cartSessionVarName(), cartSessionId(cart)); } if (lf != NULL) { cartLoadSettings(lf, cart, NULL, actionVar); cartHideDefaultTracks(cart); hubConnectLoadHubs(cart); cartCopyCustomTracks(cart); cartCheckForCustomTracks(cart, dyMessage); lineFileClose(&lf); } return dyStringCannibalize(&dyMessage); } void renamePrefixedCartVar(char *prefix, char *oldName, char *newName)