8715d83d38d8bb18adfdd9ce05771b4cede85407 angie Fri Dec 5 09:52:07 2014 -0800 Moved some hgTables code that had been copied into a couple differentplaces into a new lib module, cartTrackDb. hgGenome/import.c has code that is fairly similar but that also needs to filter out custom tracks that were generated by hgGenome. diff --git src/hg/hgTables/schema.c src/hg/hgTables/schema.c index e65a217..7d4a03a 100644 --- src/hg/hgTables/schema.c +++ src/hg/hgTables/schema.c @@ -1,28 +1,29 @@ /* schema - display info about database organization. */ /* Copyright (C) 2014 The Regents of the University of California * See README in this or parent directory for licensing information. */ #include "common.h" #include "linefile.h" #include "hash.h" #include "memalloc.h" #include "obscure.h" #include "htmshell.h" #include "cheapcgi.h" #include "cart.h" +#include "cartTrackDb.h" #include "jksql.h" #include "hdb.h" #include "web.h" #include "trackDb.h" #include "joiner.h" #include "tableDescriptions.h" #include "asParse.h" #include "customTrack.h" #include "bedCart.h" #include "hgMaf.h" #include "hgTables.h" #include "wikiTrack.h" #include "makeItemsItem.h" #include "bedDetail.h" #include "pgSnp.h" @@ -392,31 +393,31 @@ if (startsWithWord("bigWig", type)) printf("<BR>This table simply points to a file in " "<A HREF=\"/goldenPath/help/bigWig.html\" TARGET=_BLANK>" "BigWig</A> format.<BR>\n"); } jpList = joinerRelate(joiner, db, table); /* sort and unique list */ slUniqify(&jpList, joinerPairCmpOnAandB, joinerPairFree); if (jpList != NULL) { webNewSection("Connected Tables and Joining Fields"); for (jp = jpList; jp != NULL; jp = jp->next) { - if (accessControlDenied(jp->b->database, jp->b->table)) + if (cartTrackDbIsAccessDenied(jp->b->database, jp->b->table)) continue; struct joinerSet *js = jp->identifier; boolean aViaIndex, bViaIndex; hPrintSpaces(6); hPrintf("%s.", jp->b->database); hPrintf("<A HREF=\"%s?", cgiScriptName()); hPrintf("%s&", cartSidUrlString(cart)); hPrintf("%s=%s&", hgtaDoSchemaDb, jp->b->database); hPrintf("%s=%s", hgtaDoSchemaTable, jp->b->table); hPrintf("\">"); hPrintf("%s", jp->b->table); hPrintf("</A>"); aViaIndex = isViaIndex(js, jp->a); bViaIndex = isViaIndex(js, jp->b); hPrintf(".%s ", jp->b->field);