src/hg/hgTables/identifiers.c 1.28

1.28 2009/07/08 23:18:53 angie
Fix for corner case in explainIdentifiers: when xrefTable is the selected table, and its idField happens to be the same as its alias field for the main table (e.g. refLink), don't refer to the field twice (thanks Katrina).
Index: src/hg/hgTables/identifiers.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTables/identifiers.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -b -B -U 4 -r1.27 -r1.28
--- src/hg/hgTables/identifiers.c	17 Mar 2009 04:28:39 -0000	1.27
+++ src/hg/hgTables/identifiers.c	8 Jul 2009 23:18:53 -0000	1.28
@@ -82,10 +82,15 @@
 	idField, curTable);
 if (aliasField != NULL)
     {
     if (sameString(curTable, xrefTable))
+	{
+	if (!sameString(idField, aliasField))
 	hPrintf(", or the <B>%s</B> field.\n", aliasField);
     else
+	    hPrintf(".\n");
+	}
+    else
 	hPrintf(", or the <B>%s</B> field of the alias table <B>%s</B>.\n",
 		aliasField, xrefTable);
     }
 else