3bf55bde3129042f2f8c33a7ea461c13c34a64ea
braney
  Mon Jul 18 18:38:47 2011 -0700
oops.. these are part of the fixes for #4627
diff --git src/hg/lib/hubConnect.c src/hg/lib/hubConnect.c
index 3b71361..edbd575 100644
--- src/hg/lib/hubConnect.c
+++ src/hg/lib/hubConnect.c
@@ -469,40 +469,43 @@
 int id = 0;
 
 *errorMessage = NULL;
 
 if ((id = getHubId(url, errorMessage)) > 0)
     return id;
 
 getAndSetHubStatus(database, cart, url, FALSE, FALSE);
 
 if ((id = getHubId(url, errorMessage)) == 0)
     errAbort("inserted new hubUrl %s, but cannot find it", url);
 
 return id;
 }
 
-void hubCheckForNew(char *database, struct cart *cart)
-/* see if the user just typed in a new hub url */
+boolean hubCheckForNew(char *database, struct cart *cart)
+/* see if the user just typed in a new hub url, return TRUE if so */
 {
 char *url = cartOptionalString(cart, hgHubDataText);
 
 if (url != NULL)
     {
+    stripChar(url, ' ');
     getAndSetHubStatus(database, cart, url, TRUE, TRUE);
     cartRemove(cart, hgHubDataText);
+    return TRUE;
     }
+return FALSE;
 }
 
 void hubClearStatus(char *url)
 {
 struct sqlConnection *conn = hConnectCentral();
 char query[512];
 
 safef(query, sizeof(query), "select id from %s where hubUrl = \"%s\"", hubStatusTableName, url);
 unsigned id = sqlQuickNum(conn, query);
 
 if (id == 0)
     errAbort("could not find url %s in status table (%s)\n", 
 	url, hubStatusTableName);
 
 safef(query, sizeof(query), "delete from %s where hubUrl = \"%s\"", hubStatusTableName, url);