ef3601ca0a92e93e9d512b112f8f6c02eb712ffc
max
  Wed May 22 10:59:05 2013 -0700
added comment code review #10861
diff --git src/hg/hgc/pubs.c src/hg/hgc/pubs.c
index 73f7979..09d4642 100644
--- src/hg/hgc/pubs.c
+++ src/hg/hgc/pubs.c
@@ -674,30 +674,32 @@
 
 web2ImgLink(yifPageUrl, clickedFileUrl, "Image from YIF", 600, 10, 10); 
 
 web2EndSection();
 }
 
 static bool printSeqSection(char *articleId, char *title, bool showDesc, struct sqlConnection *conn, struct hash* clickedSeqs, bool isClickedSection, bool fasta, char *pslTable, char *articleTable)
 /* print a section with a table of sequences, show only sequences with IDs in hash,
  * There are two sections, respective sequences are shown depending on isClickedSection and clickedSeqs 
  *   - seqs that were clicked on (isClickedSection=True) -> show only seqs in clickedSeqs
  *   - other seqs (isClickedSection=False) -> show all other seqs
  * 
  * */
 {
 // get data from mysql
+// I support two different schemas: new and old. On old tables, there is no fileUrl yet on the annotations
+// that means that oldQuery just uses an empty string for the fileUrl field.
 char *oldQuery = "SELECT fileDesc, snippet, locations, annotId, sequence, \"\" FROM %s WHERE articleId='%s'";
 char *newQuery = "SELECT fileDesc, snippet, locations, annotId, sequence, fileUrl FROM %s WHERE articleId='%s'";
 
 char *queryTemplate = oldQuery;
 if (hHasField("hgFixed", pubsSequenceTable, "fileUrl"))
     queryTemplate = newQuery;
 
 char query[4096];
 safef(query, sizeof(query), queryTemplate, pubsSequenceTable, articleId);
 if (pubsDebug)
     puts(query);
 struct sqlResult *sr = sqlGetResult(conn, query);
 
 // construct title for section
 char *otherFormat = NULL;