83043aefb8f67b37febbf9a9db14eff3ed7efc4c
galt
  Thu Jul 17 11:23:35 2014 -0700
fix relative links
diff --git src/hg/qaPushQ/qaPushQ.c src/hg/qaPushQ/qaPushQ.c
index e5efcdb..60386f1 100644
--- src/hg/qaPushQ/qaPushQ.c
+++ src/hg/qaPushQ/qaPushQ.c
@@ -583,31 +583,31 @@
 if (isNew)
     {
     replaceInStr(html, sizeof(html), "<!DISABLED>", "");
     replaceInStr(html, sizeof(html), "<!READONLY>", "");
     replaceInStr(html, sizeof(html), "<!submitbutton>",
                  "<input TYPE=SUBMIT NAME=\"submit\" VALUE=\"Submit\" >&nbsp;&nbsp;");
     replaceInStr(html, sizeof(html), "<!delbutton>", "");
     replaceInStr(html, sizeof(html), "<!pushbutton>", "");
     replaceInStr(html, sizeof(html), "<!clonebutton>", "");
     replaceInStr(html, sizeof(html), "<!bouncebutton>", "");
     replaceInStr(html, sizeof(html), "<!lockbutton>", "");
     replaceInStr(html, sizeof(html), "<!refreshlink>", "");
     replaceInStr(html, sizeof(html), "<!transferbutton>", "");
 
     safef(tempLink, sizeof(tempLink),
-                "<a href=\"/cgi-bin/qaPushQ?cb=%s\">CANCEL</a>&nbsp;&nbsp;",newRandState);
+                "<a href=\"qaPushQ?cb=%s\">CANCEL</a>&nbsp;&nbsp;",newRandState);
     replaceInStr(html, sizeof(html), "<!cancellink>", tempLink );
 
     showSizesJavascript();
 
     }
 else
     {
     if (myLock)
 	{
         replaceInStr(html, sizeof(html), "<!DISABLED>", "");
         replaceInStr(html, sizeof(html), "<!READONLY>", "");
 
         replaceInStr(html, sizeof(html), "<!submitbutton>",
                      "<input TYPE=SUBMIT NAME=\"submit\" VALUE=\"Submit\" >&nbsp;&nbsp;");
         replaceInStr(html, sizeof(html), "<!delbutton>" ,
@@ -649,35 +649,35 @@
         showSizesJavascript();
         }
     else
 	{ /* we don't have a lock yet, disable and readonly */
         replaceInStr(html, sizeof(html), "<!DISABLED>", "DISABLED");
         replaceInStr(html, sizeof(html), "<!READONLY>", "READONLY");
         replaceInStr(html, sizeof(html), "<!submitbutton>", "");
         replaceInStr(html, sizeof(html), "<!delbutton>", "");
         replaceInStr(html, sizeof(html), "<!pushbutton>", "");
         replaceInStr(html, sizeof(html), "<!clonebutton>", "");
         replaceInStr(html, sizeof(html), "<!bouncebutton>", "");
         replaceInStr(html, sizeof(html), "<!lockbutton>",
                      "<input TYPE=SUBMIT NAME=\"lockbutton\" VALUE=\"Lock\" >&nbsp;&nbsp;");
 
         safef(tempLink, sizeof(tempLink),
-              "<a href=\"/cgi-bin/qaPushQ?cb=%s\">RETURN</a>&nbsp;&nbsp;",newRandState);
+              "<a href=\"qaPushQ?cb=%s\">RETURN</a>&nbsp;&nbsp;",newRandState);
         replaceInStr(html, sizeof(html), "<!cancellink>", tempLink );
 
         safef(tempLink, sizeof(tempLink),
-              "<a href=\"/cgi-bin/qaPushQ?action=edit&qid=%s&cb=%s\">REFRESH</a>&nbsp;&nbsp;",
+              "<a href=\"qaPushQ?action=edit&qid=%s&cb=%s\">REFRESH</a>&nbsp;&nbsp;",
               ki->qid,newRandState);
         replaceInStr(html, sizeof(html), "<!refreshlink>", tempLink );
 
 	replaceInStr(html, sizeof(html), "<!transferbutton>", "");
 	replaceInStr(html, sizeof(html), "<!sizesbutton>", "");
 	if (sameString(ki->lockUser,""))
 	    {
 	    safef(tempMsg,sizeof(tempMsg),"%s %s", msg, "READONLY view. Press Lock to edit. Click RETURN for the main queue.");
 	    }
 	else
 	    {
 	    safef(tempMsg,sizeof(tempMsg),"%s User %s currently has lock on Queue Id %s since %s.",
 		msg, ki->lockUser, ki->qid,ki->lockDateTime );
 	    }
 	safef(msg,sizeof(msg), "%s", tempMsg);
@@ -770,59 +770,59 @@
 }
 
 char *fixLineBreaks(char *s)
 /* insert <br> before \n to have an effect inside html */
 {
 return replaceChars(s,"\n","<br>\n");
 }
 
 
 void drawDisplayLine(enum colEnum col, struct pushQ *ki)
 {
 char *temp = NULL;
 switch(col)
     {
     case e_qid:
-	printf("<td><A href=\"/cgi-bin/qaPushQ?action=edit&qid=%s&cb=%s\">%s</A>%s",
+	printf("<td><A href=\"qaPushQ?action=edit&qid=%s&cb=%s\">%s</A>%s",
 	    ki->qid, newRandState, ki->qid, sameString(ki->lockUser,"") ? "":"*" );
 	if (ki->pushState[0]=='Y')
 	    {
-	    printf("<BR><A href=\"/cgi-bin/qaPushQ?action=pushDone&qid=%s&cb=%s\">Done!</A>",
+	    printf("<BR><A href=\"qaPushQ?action=pushDone&qid=%s&cb=%s\">Done!</A>",
 		ki->qid, newRandState );
 	    }
 	printf("</td>\n");
 	break;
 
     case e_pqid:
 	printf("<td>%s</td>\n", ki->pqid   );
 	break;
 
 
     case e_priority:
 	if (ki->priority[0] == 'L')
 	    {
 	    printf("<td>%s</td>", ki->priority);
 	    }
 	else
 	    {
 	    printf(
 		"<td><table><tr><td>%s</td><td>"
-		"<A href=\"/cgi-bin/qaPushQ?action=promote&qid=%s&cb=%s\">^</A>&nbsp;&nbsp;"
-		"<A href=\"/cgi-bin/qaPushQ?action=top&qid=%s&cb=%s\">T</A>&nbsp;&nbsp;"
+		"<A href=\"qaPushQ?action=promote&qid=%s&cb=%s\">^</A>&nbsp;&nbsp;"
+		"<A href=\"qaPushQ?action=top&qid=%s&cb=%s\">T</A>&nbsp;&nbsp;"
 		"</td></tr><tr><td>&nbsp</td><td>"
-		"<A href=\"/cgi-bin/qaPushQ?action=demote&qid=%s&cb=%s\">v</A>&nbsp;&nbsp;"
-		"<A href=\"/cgi-bin/qaPushQ?action=bottom&qid=%s&cb=%s\">B</A>"
+		"<A href=\"qaPushQ?action=demote&qid=%s&cb=%s\">v</A>&nbsp;&nbsp;"
+		"<A href=\"qaPushQ?action=bottom&qid=%s&cb=%s\">B</A>"
 		"</td></tr></table></td>\n",
 		ki->priority,
 		ki->qid, newRandState,
 		ki->qid, newRandState,
 		ki->qid, newRandState,
 		ki->qid, newRandState
 		);
 	    }
 	break;
 
     case e_rank:
 	printf("<td>%d</td>\n", ki->rank      );
 	break;
 
     case e_qadate:
@@ -1010,50 +1010,50 @@
 slCount(kiList)
 */
 
 if (sameString(utsName.nodename,"hgwdev"))
     {
     printf("<p style=\"color:red\">Machine: %s THIS IS NOT THE REAL PUSHQ- GO TO <a href=http://hgwbeta.cse.ucsc.edu/cgi-bin/qaPushQ>HGWBETA</a> </p>\n",utsName.nodename);
     }
 
 if (!sameString(msg,""))
     {
     printf("<p style=\"color:red\">%s</p>\n",msg);
     }
 
 if (sameString(month,""))
     {
-    printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=add&cb=%s>ADD</A>\n",newRandState);
+    printf("&nbsp;<A href=qaPushQ?action=add&cb=%s>ADD</A>\n",newRandState);
     }
 else
     {
-    printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=display&month=current&cb=%s>Current</A>\n",newRandState);
-    }
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=reset&cb=%s>Logout</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=showAllCol&cb=%s>All Columns</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=showDefaultCol&cb=%s>Default Columns</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=showMonths&cb=%s>Log by Month</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=showGateway&cb=%s>Gateway</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=showDisplayHelp target=\"_blank\">Help</A>\n");
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=releaseLog target=\"_blank\">Release Log</A>\n");
-//printf("&nbsp;<A href=/cgi-bin/qaPushQ?action=releaseLogPush target=\"_blank\">Publish RL</A>\n");
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?cb=%s#priorityA>A</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?cb=%s#priorityB>B</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?cb=%s#priorityC>C</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?cb=%s#priorityD>D</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?cb=%s#priorityL>L</A>\n",newRandState);
-printf("&nbsp;<A href=/cgi-bin/qaPushQ?cb=%s>Refresh</A>\n",newRandState);
+    printf("&nbsp;<A href=qaPushQ?action=display&month=current&cb=%s>Current</A>\n",newRandState);
+    }
+printf("&nbsp;<A href=qaPushQ?action=reset&cb=%s>Logout</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?action=showAllCol&cb=%s>All Columns</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?action=showDefaultCol&cb=%s>Default Columns</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?action=showMonths&cb=%s>Log by Month</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?action=showGateway&cb=%s>Gateway</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?action=showDisplayHelp target=\"_blank\">Help</A>\n");
+printf("&nbsp;<A href=qaPushQ?action=releaseLog target=\"_blank\">Release Log</A>\n");
+//printf("&nbsp;<A href=qaPushQ?action=releaseLogPush target=\"_blank\">Publish RL</A>\n");
+printf("&nbsp;<A href=qaPushQ?cb=%s#priorityA>A</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?cb=%s#priorityB>B</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?cb=%s#priorityC>C</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?cb=%s#priorityD>D</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?cb=%s#priorityL>L</A>\n",newRandState);
+printf("&nbsp;<A href=qaPushQ?cb=%s>Refresh</A>\n",newRandState);
 //printf("&nbsp;newRandState=%s\n",newRandState);
 //printf("&nbsp;oldRandState=%s\n",oldRandState);
 
 /* draw table header */
 
 printf("<H2>Track Push Queue");
 if (!sameString(pushQtbl,"pushQ"))
     {
     printf(" for %s",pushQtbl);
     }
 if (!sameString(month,""))
     {
     printf(" (%s)",month);
     }
 printf("</H2>\n");
@@ -2232,49 +2232,49 @@
 XdoPromoteColumn(-1);
 }
 
 
 
 
 void doShowAllColumns()
 /* Display hidden columns available for resurrection */
 {
 int c = 0;
 char templist[512];
 char tempe[64];
 
 printf("<h4>Show Hidden Columns</h4>\n");
 printf("<br>\n");
-printf("<a href=\"/cgi-bin/qaPushQ?cb=%s\">RETURN</a><br>", newRandState);
+printf("<a href=\"qaPushQ?cb=%s\">RETURN</a><br>", newRandState);
 printf("<br>\n");
 printf("Click on any column below to un-hide it.<br>\n");
 printf("<br>\n");
 
 safef(templist,sizeof(templist),",%s,",showColumns);  /* add sentinel comma values to the ends of the col list */
 
 for (c=0; c<e_NUMCOLS; c++)
     {
     safef(tempe,sizeof(tempe),",%s,",colName[c]);  /* add sentinel comma values to the ends of the col element */
     if (strstr(templist,tempe)==NULL)
 	{
-	printf("<a href=\"/cgi-bin/qaPushQ?action=showColumn&colName=%s&cb=%s\">%s</a><br><br>",
+	printf("<a href=\"qaPushQ?action=showColumn&colName=%s&cb=%s\">%s</a><br><br>",
 	    colName[c], newRandState, colName[c]);
 	}
     }
 
 printf("<br>\n");
-printf("<a href=\"/cgi-bin/qaPushQ?cb=%s\">RETURN</a><br>", newRandState);
+printf("<a href=\"qaPushQ?cb=%s\">RETURN</a><br>", newRandState);
 }
 
 
 void doShowColumn()
 /* Make column visible again */
 {
 struct dyString * s = NULL;
 char *colName = NULL;
 char templist[512];
 char tempe[64];
 
 s = newDyString(2048);  /* need room */
 
 colName = cgiString("colName");
 
@@ -2313,31 +2313,31 @@
 char query[256];
 
 printf("<h4>Logs for Month</h4>\n");
 printf("<br>\n");
 printf("<A href=qaPushQ?action=display&month=current&cb=%s>Current</A><br>\n", newRandState);
 printf("<br>\n");
 
 sqlSafef(query, sizeof(query), "select distinct substring(qadate,1,7) from %s where priority='L' order by qadate desc",pushQtbl);
 sr = sqlGetResult(conn, query);
 while ((row = sqlNextRow(sr)) != NULL)
     {
     printf("<A href=qaPushQ?action=display&month=%s&cb=%s>%s</A><br>\n",row[0],newRandState,row[0]);
     }
 sqlFreeResult(&sr);
 printf("<br>\n");
-printf("<a href=\"/cgi-bin/qaPushQ?cb=%s\">RETURN</a><br>", newRandState);
+printf("<a href=\"qaPushQ?cb=%s\">RETURN</a><br>", newRandState);
 }
 
 
 
 void getIndexes(struct sqlConnection *conn, char *tbl, char *s, int ssize)
 /* Get indexes with show index on table command. Return -1 if err.
  * Will match multiple if "%" used in tbl */
 {
 char query[256];
 char **row;
 struct sqlResult *sr;
 char *fld = NULL;
 int f = 0, i = 0, n = 0, c = 0;
 char lastKeyName[256]="";
 
@@ -2989,38 +2989,38 @@
 void doTransfer()
 /* Present choice of queues to which the selected and locked record may be transferred */
 {
 struct pushQ *q;
 char newQid[sizeof(q->qid)] = "";
 char tempUrl[256];
 
 ZeroVar(&q);
 
 safef(newQid, sizeof(newQid), "%s", cgiString("qid"));
 
 printf("<H2>Transfer Queue Entry %s:%s to Another Queue </H2>\n", pushQtbl, newQid);
 
 q=mustLoadPushQ(newQid);
 
-printf("<a href=\"/cgi-bin/qaPushQ?action=edit&qid=%s&cb=%s\">RETURN</a> \n",newQid,newRandState);
+printf("<a href=\"qaPushQ?action=edit&qid=%s&cb=%s\">RETURN</a> \n",newQid,newRandState);
 printf("<br>\n");
 printf("<br>\n");
 
 safef(tempUrl, sizeof(tempUrl), "action=transferTo&qid=%s&toOrg", newQid);
 listQueues(tempUrl, TRUE);
 
-printf("<a href=\"/cgi-bin/qaPushQ?action=edit&qid=%s&cb=%s\">RETURN</a> <br>\n",newQid,newRandState);
+printf("<a href=\"qaPushQ?action=edit&qid=%s&cb=%s\">RETURN</a> <br>\n",newQid,newRandState);
 pushQFree(&q);
 }
 
 
 void doTransferTo()
 /* Execute transfer of qid from current pushQtbl to named target Q table */
 {
 struct pushQ *q;
 int updateSize = 2456; /* almost anything works here */
 char *toOrg = cgiString("toOrg");  /* required cgi var */
 char *origQid = NULL;
 int newqid = 0;
 char newQid     [sizeof(q->qid)]      = "";
 char *savePushQtbl = cloneString(pushQtbl);
 char query[256];
@@ -3245,31 +3245,31 @@
 	}
     }
 sqlFreeResult(&sr);
 printf("<br>\n");
 }
 
 void doShowGateway()
 /* This gives the user a choice of queues to use */
 {
 
 printf("<h2>Gateway - Choose Queue</h2>\n");
 printf("<br>\n");
 
 listQueues("org", FALSE);
 
-printf("<a href=\"/cgi-bin/qaPushQ?cb=%s\">RETURN</a> <br>\n",newRandState);
+printf("<a href=\"qaPushQ?cb=%s\">RETURN</a> <br>\n",newRandState);
 }
 
 void doUnlock()
 /* currently a backdoor for logged-in users to unlock a record */
 {
 struct pushQ *q;
 int updateSize = 2456; /* almost anything works here */
 
 q = mustLoadPushQ(cgiString("qid")); /* required cgi var */
 
 /* unlock record */
 safef(q->lockUser, sizeof(q->lockUser), "%s","");
 safef(q->lockDateTime, sizeof(q->lockDateTime), "%s","");
 
 /* update existing record */
@@ -3383,34 +3383,34 @@
 /* regular log index #links */
 for (ki = kiList; ki != NULL; ki = ki->next)
     {
     safef(tempName, sizeof(tempName), "%s", ki->organism);
     if (!sameString(ki->organism, ki->genome))
 	{
 	safef(tempName,sizeof(tempName),"<em>%s</em>",ki->genome);
 	}
     printf("<li><a CLASS=\"toc\" HREF=\"#%s\">%s %s (%s)</a></li>\n",
 	ki->name,tempName,ki->description,ki->name);
     }
 
 printf("</ul>\n");
 printf("<p>\n");
 printf(" For more information about the tracks and tables listed on this page, refer to the "
-"<a href=/goldenPath/help/hgTracksHelp.html#IndivTracks>User's Guide</a>.<p>\n");
+"<a href=../goldenPath/help/hgTracksHelp.html#IndivTracks>User's Guide</a>.<p>\n");
 
 strftime (now, sizeof(now), "%02d %b %Y", loctime); /* default to today's date */
-printf("<em>Last updated %s. <a HREF=\"/contacts.html\">Inquiries and feedback welcome</a>.</em>\n",now);
+printf("<em>Last updated %s. <a HREF=\"../contacts.html\">Inquiries and feedback welcome</a>.</em>\n",now);
 /* 10 LATEST CHANGES */
 webNewSection("<A NAME=recent></A> 10 Latest Changes (all assemblies)");
 
 printf("<TABLE CELLPADDING=4 style='border:1px solid #aaaaaa; width:100%%;'>\n"
     "<TR>\n"
     "<TD nowrap><B style='color:#006666;'>Track/Table Name</B></TD>\n"
     "<TD nowrap><B style='color:#006666;'>Assembly</B></TD>\n"
     "<TD nowrap><B style='color:#006666;'>Release Date</B></TD>\n"
     "</TR>\n"
     );
 sqlSafef(query,sizeof(query),
     "select releaseLog, dbs, qadate, releaseLogUrl from pushQ "
     "where priority='L' and releaseLog != '' and dbs != '' %-s"
     "order by qadate desc, qid desc ", encodeClause
     );