716acb7dabc447ddf157ec96ad615a195b4df3d2
chinhli
  Fri Apr 6 15:59:16 2012 -0700
Finished hgLogin UI
diff --git src/hg/lib/hgLoginLink.c src/hg/lib/hgLoginLink.c
index fad57b1..fe577c9 100644
--- src/hg/lib/hgLoginLink.c
+++ src/hg/lib/hgLoginLink.c
@@ -5,30 +5,36 @@
 #include "htmshell.h"
 #include "cheapcgi.h"
 #include "hgConfig.h"
 #include "hui.h"
 #include "cart.h"
 #include "web.h"
 #include "hgLoginLink.h"
 
 
 char *hgLoginLinkHost()
 /* Return the hgLogin host specified in hg.conf, or NULL.  Allocd here. */
 {
 return cloneString(cfgOption(CFG_HGLOGIN_HOST));
 }
 
+char *hgLoginLinkSysName()
+/* Return the hgLogin system name specified in hg.conf, or NULL. Allocd here. */
+{
+return cloneString(cfgOption(CFG_HGLOGIN_SYSNAME));
+}
+
 boolean hgLoginLinkEnabled()
 /* Return TRUE if all hgLogin.* parameters are defined in hg.conf . */
 {
 return ((cfgOption(CFG_HGLOGIN_HOST) != NULL) &&
 	(cfgOption(CFG_HGLOGIN_USER_NAME_COOKIE) != NULL) &&
 	(cfgOption(CFG_HGLOGIN_LOGGED_IN_COOKIE) != NULL));
 }
 
 static char *hgLoginLinkUserNameCookie()
 /* Return the cookie name specified in hg.conf as the hgLogin user name cookie. */
 {
 return cfgOption(CFG_HGLOGIN_USER_NAME_COOKIE);
 }
 
 static char *hgLoginLinkLoggedInCookie()
@@ -68,31 +74,30 @@
 
 char *hgLoginLinkUserLoginUrl(int hgsid)
 /* Return the URL for the hgLogin user hgLogin page. */
 {
 char buf[2048];
 char *retEnc = encodedHgSessionReturnUrl(hgsid);
 if (! hgLoginLinkEnabled())
     errAbort("hgLoginLinkUserLoginUrl called when hgLogin is not enabled (specified "
 	     "in hg.conf).");
 safef(buf, sizeof(buf),
       /* "http://%s/index.php?title=Special:UserhgLoginUCSC&returnto=%s",
  * */
       "http://%s/cgi-bin/hgLogin?hgLogin.do.displayLoginPage=1&returnto=%s",
       hgLoginLinkHost(), retEnc);
 freez(&retEnc);
-/* DEBUG: */ printf("<BR>DEBUG in hgLoginLink Z: cloneString(buf) is%s<BR>",cloneString(buf));
 
 return(cloneString(buf));
 }
 
 char *hgLoginLinkUserLogoutUrl(int hgsid)
 /* Return the URL for the hgLogin user logout page. */
 {
 char buf[2048];
 char *retEnc = encodedHgSessionReturnUrl(hgsid);
 if (! hgLoginLinkEnabled())
     errAbort("hgLoginLinkUserLogoutUrl called when hgLogin is not enable (specified "
 	     "in hg.conf).");
 safef(buf, sizeof(buf),
    /*   "http://%s/index.php?title=Special:UserlogoutUCSC&returnto=%s",
  *   */