4a030195664cbdd1d3c1a4b81b1ed41dbf6d9bc5 angie Fri Feb 15 14:02:58 2019 -0800 Prevent hgFind lib (specifically genomePos -> hgPositionsHtml) from opening a web page; instead, pass up results and warning messages to the calling CGI so it can open the page its own way. refs #22945 hgTracks, hgTables and hgVai used to call findGenomePos{,Web} to resolve positions; hgTables and hgVai had to detect after the fact whether an HTML page had been started (with warnings and/or multiple results). In fact, hgPositionsHtml called webEnd which could cause conflicts with what the CGI was doing afterwards. Now, instead of findGenomePos{,Web} there is hgFindSearch which returns hgp and also warning messages, if any, via a dyString parameter. The calling CGI decides how to open the page if necessary (for hgTracks, it's already open) and displays warnings/multiple results -- or just proceeds as usual with the single position result. diff --git src/hg/inc/cart.h src/hg/inc/cart.h index 51202be..3783d2f 100644 --- src/hg/inc/cart.h +++ src/hg/inc/cart.h @@ -387,30 +387,34 @@ /* Write out HTML footer and get rid or error handler. Needed with cartEmptyShell, * but not cartHtmlShell. */ void cartWebStart(struct cart *theCart, char *db, char *format, ...) /* Print out pretty wrapper around things when working * from cart. Balance this with cartWebEnd. */ #if defined(__GNUC__) __attribute__((format(printf, 3, 4))) #endif ; void cartVaWebStart(struct cart *cart, char *db, char *format, va_list args); /* Print out pretty wrapper around things when working * from cart. */ +void cartWebStartHeader(struct cart *cart, char *db, char *format, ...); +/* Print out Content-type header and then pretty wrapper around things when working + * from cart. */ + void cartWebEnd(); /* End out pretty wrapper around things when working * from cart. */ void cartHtmlShellWithHead(char *head, char *title, void (*doMiddle)(struct cart *cart), char *cookieName, char **exclude, struct hash *oldVars); /* Load cart from cookie and session cgi variable. Write web-page * preamble including head and title, call doMiddle with cart, and write end of web-page. * Exclude may be NULL. If it exists it's a comma-separated list of * variables that you don't want to save in the cart between * invocations of the cgi-script. */ void cartHtmlShell(char *title, void (*doMiddle)(struct cart *cart), char *cookieName, char **exclude, struct hash *oldVars); /* Load cart from cookie and session cgi variable. Write web-page preamble, call doMiddle