e6f14fcef3884ca03768d4c646b442f3b606a959 braney Thu Jul 11 12:39:00 2013 -0700 some cleanup of assembly hubs: require organism and defaultPos, tolerate missing scientificName, groups, htmlPath and orderKey. Fix weird bug with wikiTrack missing a settingsHash. diff --git src/hg/lib/hgFind.c src/hg/lib/hgFind.c index 04cab19..7989c2a 100644 --- src/hg/lib/hgFind.c +++ src/hg/lib/hgFind.c @@ -3191,41 +3191,44 @@ * explaining what's missing. */ { char *htmlPath = hHtmlPath(database); char *htmlString = NULL; size_t htmlStrLength = 0; if (strstrNoCase(organism, "zoo")) webNewSection("About the NISC Comparative Sequencing Program Browser"); else webNewSection("%s Genome Browser – %s assembly" " <A HREF=\"%s?%s=%d&chromInfoPage=\">(sequences)</A>", trackHubSkipHubName(organism), trackHubSkipHubName(database), hgTracksName(), cartSessionVarName(), cartSessionId(cart)); -if (htmlPath != NULL && fileExists(htmlPath)) +if (htmlPath != NULL) + { + if (fileExists(htmlPath)) readInGulp(htmlPath, &htmlString, &htmlStrLength); else if ( startsWith("http://" , htmlPath) || startsWith("https://", htmlPath) || startsWith("ftp://" , htmlPath)) { struct lineFile *lf = udcWrapShortLineFile(htmlPath, NULL, 256*1024); htmlString = lineFileReadAll(lf); htmlStrLength = strlen(htmlString); lineFileClose(&lf); } + } if (htmlStrLength > 0) { puts(htmlString); freeMem(htmlString); freeMem(htmlPath); } else { printf("<H2>%s</H2>\n", trackHubSkipHubName(organism)); if (htmlPath == NULL || htmlPath[0] == 0) printf("\n<!-- No dbDb.htmlPath for %s -->\n", database); else printf("\n<!-- Couldn't get contents of %s -->\n", htmlPath); }