ce5fb4ee78a01179f2f53114b6eb52ca77811eb6
kate
  Wed Jan 23 10:08:41 2013 -0800
1. hgFileUi now only prints data restriction warning if the composite has a restricted object. 2. Add -cv option to mdbPrint to allow alternate CV file.  2. 3. A step toward modularizing restriction timestamp handling.  #10006  Mute File UI loud warnings when they are not applicable.
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 176f0f5..c8ae6e0 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -3924,31 +3924,31 @@
 char *encodeRestrictionDate(char *db,struct trackDb *trackDb,boolean excludePast)
 // Create a string for ENCODE restriction date of this track
 // if return is not null, then free it after use
 {
 if (!trackDb)
     return NULL;
 
 char *date = NULL;
 
 if (metadataForTable(db,trackDb,NULL) != NULL)
     {
     date = cloneString((char *)metadataFindValue(trackDb,"dateUnrestricted"));
     if (date != NULL)
         date = strSwapChar(date, ' ', 0);   // Truncate time (not expected, but just in case)
 
-    if (excludePast && !isEmpty(date) && dateIsOld(date,"%F"))
+    if (excludePast && !isEmpty(date) && dateIsOld(date, MDB_ENCODE_DATE_FORMAT))
         freez(&date);
     }
 return date;
 }
 
 static void compositeUiSubtracks(char *db, struct cart *cart, struct trackDb *parentTdb)
 // Display list of subtracks and descriptions with checkboxes to control visibility and
 // possibly other nice things including links to schema and metadata and a release date.
 {
 struct trackDb *subtrack;
 struct dyString *dyHtml = newDyString(SMALLBUF);
 //char *colors[2]   = { COLOR_BG_DEFAULT,
 //                      COLOR_BG_ALTDEFAULT };
 char *colors[2]   = { "bgLevel1",
                       "bgLevel1" };
@@ -4385,31 +4385,31 @@
             view = membership->membership[ix];
         MAKE_CFG_SUBTRACK_DIV(subtrack->track,view);
         }
 
     // A schema link for each track
     printf("</td>\n<TD>&nbsp;");
     makeSchemaLink(db,subtrack,"schema");
     printf("&nbsp;");
 
     // Do we have a restricted until date?
     if (restrictions)
         {
         char *dateDisplay = encodeRestrictionDate(db,subtrack,FALSE); // includes dates in the past
         if (dateDisplay)
             {
-            if (dateIsOld(dateDisplay,"%F"))
+            if (dateIsOld(dateDisplay, MDB_ENCODE_DATE_FORMAT))
                 printf("</TD>\n<TD align='center' nowrap style='color: #BBBBBB;'>&nbsp;%s&nbsp;",
                        dateDisplay);
             else
                 printf("</TD>\n<TD align='center'>&nbsp;%s&nbsp;", dateDisplay);
             }
         }
 
     // End of row and free ourselves of this subtrack
     puts("</TD></TR>\n");
     checkBoxIdFree(&id);
     }
 
 // End of the table
 puts("</TBODY>");
 if (slCount(subtrackRefList) > 5 || (restrictions && sortOrder != NULL))