6ff14cbe503f6d3b20d61308887dc91a692ec507 braney Wed May 28 09:21:47 2025 -0700 fix some problems with quickLift reported by QA refs #35609 diff --git src/hg/lib/hui.c src/hg/lib/hui.c index fb22cbd0d5e..b7b9fadab39 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -10083,30 +10083,54 @@ } else { tableName = hTableForTrack(database, tdb->table); conn = hAllocConnTrack(database, tdb); } if (tableName) { char *date = firstWordInLine(sqlTableUpdate(conn, tableName)); if (date != NULL) printf("Data last updated at UCSC: %s
\n", date); } hFreeConn(&conn); } +char *getTrackHtml(char *db, char *trackName) +/* Grab HTML from trackDb in native database for quickLift tracks. */ +{ +char query[4096]; + +sqlSafef(query, sizeof query, "tableName = '%s'", trackHubSkipHubName(trackName)); +struct trackDb *loadTrackDb(char *db, char *where); +struct trackDb *tdb = loadTrackDb(db, query); + +char *html = tdb->html; +if (isEmpty(tdb->html)) + { + char *parent = trackDbSetting(tdb, "parent"); + char *words[10]; + + chopLine(parent,words); + sqlSafef(query, sizeof query, "tableName = '%s'", trackHubSkipHubName(words[0])); + struct trackDb *tdb = loadTrackDb(db, query); + + html = tdb->html; + } +return html; +} + void printBbiUpdateTime(time_t *timep) /* for bbi files, print out the timep value */ { printf("Data last updated at UCSC: %s
\n", sqlUnixTimeToDate(timep, FALSE)); } static boolean tableDescriptionsExists(struct sqlConnection *conn) /* Cache flag for whether tableDescriptions exists in conn, in case we will need to * fetch a lot of descriptions from tableDescriptions. */ { static struct hash *hash = NULL; if (hash == NULL) hash = hashNew(0); char *db = sqlGetDatabase(conn); int exists = hashIntValDefault(hash, db, -1);