d92cf8086b69ad2b2147509072c4ffebb0df3d53
max
  Thu Aug 22 17:46:35 2013 -0700
bugfix, forgot hits in supplements
diff --git src/hg/hgc/pubs.c src/hg/hgc/pubs.c
index 02ef5b0..07a6a9e 100644
--- src/hg/hgc/pubs.c
+++ src/hg/hgc/pubs.c
@@ -28,31 +28,39 @@
 bool pubsIsElsevier = FALSE; 
 
 // the article source is used to modify other parts of the page
 static char *articleSource;
 
 // we need the external article PMC Id for YIF links
 static char *extId = NULL;
 
 // section types in mysql table, for all annotations tables
 // we note where the hit is located in the document
 static char *pubsSecNames[] ={
       "header", "abstract",
       "intro", "methods",
       "results", "discussion",
       "conclusions", "ack",
-      "refs", "unknown" };
+      "refs", "supplement", "unknown" };
+
+// labels to show to user, have to correspond to pubsSecNames
+static char *secLabels[] ={
+      "Title", "Abstract",
+      "Introduction", "Methods",
+      "Results", "Discussion",
+      "Conclusions", "Acknowledgements",
+      "References", "Supplement", "Undetermined section (e.g. for a brief communication)" };
 
 // whether a checkbox is checked by default, have to correspond to pubsSecNames
 static int pubsSecChecked[] ={
       1, 1,
       1, 1,
       1, 1,
       1, 0,
       0, 1 };
 
 static char *pubsSequenceTable;
 
 
 /* ------ functions to replace HTML4 tables with HTML5 constructs */
 /* Web wrappers incorporating tag, id, and class HTML attributes, to support
  * styling and test */
@@ -316,38 +324,30 @@
 static struct sqlResult *querySnippets(struct sqlConnection *conn, char *markerTable, \
     char *articleId, char *markerId, char *sectionList)
 /* query marker snippet rows from mysql for an article, markerId combination */
 {
 char query[4000];
 sqlSafef(query, sizeof(query), "SELECT section, snippet FROM %s "  
     "WHERE articleId=%s AND markerId='%s' AND section in (%-s) ", 
     markerTable, articleId, markerId, sectionList);
 struct sqlResult *sr = sqlGetResult(conn, query);
 return sr;
 }
 
 static void printSectionCheckboxes()
 /* show a little form with checkboxes where user can select sections they want to show */
 {
-// labels to show to user, have to correspond to pubsSecNames
-char *secLabels[] ={
-      "Title", "Abstract",
-      "Introduction", "Methods",
-      "Results", "Discussion",
-      "Conclusions", "Acknowledgements",
-      "References", "Undetermined section (e.g. for a brief communication)" };
-
 int labelCount = sizeof(secLabels)/sizeof(char *);
 
 int i;
 printf("<P>\n");
 printf("<B>Sections of article searched:</B><BR>\n");
 printf("<FORM ACTION=\"hgc?%s&o=%s&t=%s&g=%s&i=%s\" METHOD=\"get\">\n",
     cartSidUrlString(cart), cgiString("o"), cgiString("t"), cgiString("g"), cgiString("i"));
 
 for (i=0; i<labelCount; i++) 
 {
     char *name = pubsSecNames[i];
     // checkboxes default to 0 unless checked, see 
     // http://stackoverflow.com/questions/2520952/how-come-checkbox-state-is-not-always-passed-along-to-php-script
     printf("<INPUT TYPE=\"hidden\" name=\"%s\" value=\"0\" />\n", pubsSecNames[i]);
     printf("<INPUT TYPE=\"checkbox\" name=\"%s\" ", name);