4a12b8e105ea5b518de2c1ce33c1b94e3df09a2e
hiram
  Mon Jun 25 10:56:10 2012 -0700
make the wiki track read only be an option in hg.conf
diff --git src/hg/hgc/wikiTrack.c src/hg/hgc/wikiTrack.c
index 332f66f..c8d18b6 100644
--- src/hg/hgc/wikiTrack.c
+++ src/hg/hgc/wikiTrack.c
@@ -204,32 +204,32 @@
   "<A HREF=\"%s/index.php/%s\" TARGET=_blank>%s:</A> to see "
 	"existing comments.</B><BR>\n",
        url, item->descriptionKey, item->descriptionKey);
 
 if (NULL != userName)
     hPrintf("<B>Mark this wiki article as <em>"
 	"<A HREF=\"%s/index.php/%s?action=watch\" TARGET=_blank>watched</A>"
 	"</em> to receive email notices of any comment additions.</B><BR>\n",
 	   url, item->descriptionKey);
 
 
 hPrintf("<HR>\n");
 
 if (NULL == userName)
     {
-    ;  /* enforce read-only 2012-06-22 */
-    /* offerLogin(item->id, "add comments to items on", WIKI_TRACK_TABLE); */
+    if (! wikiTrackReadOnly() ) /* read-only option 2012-06-25 */
+        offerLogin(item->id, "add comments to items on", WIKI_TRACK_TABLE);
     }
 else if (emailVerified(TRUE)) /* do print message when not verified */
     {
     startForm("addComments", G_ADD_WIKI_COMMENTS);
     char idString[128];
     safef(idString, ArraySize(idString), "%d", item->id);
     cgiMakeHiddenVar("i", idString);
     hPrintf("\n");
     webPrintLinkTableStart();
     /* first row is a title line */
     char label[256];
     safef(label, ArraySize(label),
 	"'%s' quick add comments to item '%s'\n", userName, item->name);
     webPrintWideLabelCell(label, 2);
     webPrintLinkTableNewRow();
@@ -277,33 +277,35 @@
 "}\n", NEW_ITEM_COLOR, NEW_ITEM_COLOR, NEW_ITEM_COLOR,
 	NEW_ITEM_COLOR, NEW_ITEM_COLOR, NEW_ITEM_COLOR);
 hPrintf("</SCRIPT>\n");
 }
 
 void doWikiTrack(char *wikiItemId, char *chrom, int winStart, int winEnd)
 /* handle item clicks on wikiTrack - may create new items */
 {
 char *userName = NULL;
 
 if (wikiTrackEnabled(database, &userName) && sameWord("0", wikiItemId))
     {
     cartWebStart(cart, database, "%s", "User Annotation Track: Create new item");
     if (NULL == userName)
 	{
-        /* enforce read-only 2012-06-22 */
-	/* offerLogin(0, "add new items to", WIKI_TRACK_TABLE); */
+        if (! wikiTrackReadOnly() ) /* read-only option 2012-06-25 */
+            {
+            offerLogin(0, "add new items to", WIKI_TRACK_TABLE);
 	//cartHtmlEnd();
+            }
 	return;
 	}
 
     if (emailVerified(TRUE)) /* do print message when not verified */
 	{
 	outputJavaScript();
 	startForm("createItem", G_CREATE_WIKI_ITEM);
 
 	webPrintLinkTableStart();
 	/* first row is a title line */
 	char label[256];
 	safef(label, ArraySize(label), "Create new item, owner: '%s'\n",
 	    userName);
 	webPrintWideLabelCell(label, 2);
 	webPrintLinkTableNewRow();