e77dcca9b1bffc335f2843c8cfce67119b3d039d braney Wed Nov 30 16:25:50 2011 -0800 allow specifying different names for the hubPublic and hubStatus tables (#6162) diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 974226f..b67b64f 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -206,37 +206,36 @@ ourCellStart(); printf( "" , hub->id); ourCellEnd(); } printf("\n"); printf(""); } -void hgHubConnectPublic() +static boolean outputPublicTable(struct sqlConnection *conn, char *publicTable) /* Put up the list of public hubs and other controls for the page. */ { -struct sqlConnection *conn = hConnectCentral(); char query[512]; safef(query, sizeof(query), "select hubUrl,shortLabel,longLabel,dbList from %s", - hubPublicTableName); + publicTable); struct sqlResult *sr = sqlGetResult(conn, query); char **row; boolean gotAnyRows = FALSE; while ((row = sqlNextRow(sr)) != NULL) { char *url = row[0], *shortLabel = row[1], *longLabel = row[2], *dbList = row[3]; if (gotAnyRows) webPrintLinkTableNewRow(); else { /* output header */ printf("
ERROR: %s " "Debug | ", errorMessage); ourPrintCell(removeLastComma(dbList)); ourPrintCell(url); } sqlFreeResult(&sr); if (gotAnyRows) { printf("