7f193dd4f12e64164e193a429605ed2d2249677b braney Fri Feb 9 12:13:14 2018 -0800 if hgCollection has been called, always rebuild hub. diff --git src/hg/hgCollection/hgCollection.c src/hg/hgCollection/hgCollection.c index 8e0a26a..fb78729 100644 --- src/hg/hgCollection/hgCollection.c +++ src/hg/hgCollection/hgCollection.c @@ -163,33 +163,34 @@ // get the name of the hub to use for user collections { struct tempName hubTn; char buffer[4096]; safef(buffer, sizeof buffer, "%s-%s", customCompositeCartName, db); char *hubName = cartOptionalString(cart, buffer); if (hubName == NULL) { trashDirDateFile(&hubTn, "hgComposite", "hub", ".txt"); hubName = cloneString(hubTn.forCgi); cartSetString(cart, buffer, hubName); FILE *f = mustOpen(hubName, "a"); outHubHeader(f, db); fclose(f); + } + cartSetString(cart, "hubUrl", hubName); cartSetString(cart, hgHubConnectRemakeTrackHub, hubName); - } return hubName; } static bool subtrackEnabledInTdb(struct trackDb *subTdb) /* Return TRUE unless the subtrack was declared with "subTrack ... off". */ { bool enabled = TRUE; char *words[2]; char *setting; if ((setting = trackDbLocalSetting(subTdb, "parent")) != NULL) { if (chopLine(cloneString(setting), words) >= 2) if (sameString(words[1], "off")) enabled = FALSE; } @@ -942,31 +943,31 @@ hashAdd(tdb->settingsHash, "autoScale", "on"); hashAdd(tdb->settingsHash, "compositeTrack", "on"); hashAdd(tdb->settingsHash, "aggregate", "none"); hashAdd(tdb->settingsHash, "type", "wig"); hashAdd(tdb->settingsHash, "visibility", "full"); hashAdd(tdb->settingsHash, "color", "0,0,0"); hashAdd(tdb->settingsHash, CUSTOM_COMPOSITE_SETTING, "on"); doAddTrack(cart, db, superList, trackName, collectionName, nameHash); apiOut("{\"serverSays\": \"new %s to collection\"}", NULL); } else if (sameString("saveCollection", cmd)) { char *jsonIn = cgiUsualString("jsonp", NULL); doAjax(cart, db, jsonIn, nameHash); - apiOut("{\"serverSays\": \"Collections gaved successfully.\"}", NULL); + apiOut("{\"serverSays\": \"Collections saved successfully.\"}", NULL); } } int main(int argc, char *argv[]) /* Process command line. */ { long enteredMainTime = clock1000(); cgiSpoof(&argc, argv); boolean isCommandLine = (cgiOptionalString("cgiSpoof") != NULL); if (!isCommandLine) htmlPushEarlyHandlers(); /* Make errors legible during initialization. */ oldVars = hashNew(10); cartEmptyShellNoContent(doMiddle, hUserCookie(), excludeVars, oldVars);