", stdout); // do not add a newline
}
static void ourCellEnd()
@@ -304,34 +305,37 @@
struct trix *trix = trixOpen(trixFile);
int trixWordCount = chopString(hubSearchTerms, " ", NULL, 0);
char *trixWords[trixWordCount];
trixWordCount = chopString(hubSearchTerms, " ", trixWords, trixWordCount);
struct trixSearchResult *tsList = trixSearch(trix, trixWordCount, trixWords, tsmExpand);
for ( ; tsList != NULL; tsList = tsList->next)
hashStore(urlSearchHash, tsList->itemId);
return urlSearchHash;
}
static boolean outputPublicTable(struct sqlConnection *conn, char *publicTable, char *statusTable, struct hash **pHash)
/* Put up the list of public hubs and other controls for the page. */
{
-char *trixFile = cfgOptionEnvDefault("HUBSEARCHTRIXFILE", "hubSearchTrixFile", "/gbdb/hubs/public.ix");
+char *trixFile = hReplaceGbdb(cfgOptionEnvDefault("HUBSEARCHTRIXFILE", "hubSearchTrixFile", "/gbdb/hubs/public.ix"));
char *hubSearchTerms = cartOptionalString(cart, hgHubSearchTerms);
char *cleanSearchTerms = cloneString(hubSearchTerms);
-boolean haveTrixFile = fileExists(trixFile);
+int trixFd = netUrlOpen(trixFile);
+boolean haveTrixFile = (trixFd != -1);
+if (haveTrixFile)
+ close(trixFd);
struct hash *urlSearchHash = NULL;
printf("
\n");
// if we have a trix file, draw the search box
if (haveTrixFile)
{
puts("Enter search terms to find in public track hub description pages: "
" \n"
"\n");
jsOnEventById("click", "hubSearchButton",
"document.searchHubForm.elements['hubSearchTerms'].value=$('#hubSearchTerms').val();"
"document.searchHubForm.submit();return true;");