fb54b782482ebcc05df2647776f624ddea8301e4 galt Wed Feb 15 14:18:02 2017 -0800 fixes minor javascript syntax issues, missing semi-colon and newline. refs #18538 diff --git src/hg/hgLogin/hgLogin.c src/hg/hgLogin/hgLogin.c index 40d5d06..d31e8f7 100644 --- src/hg/hgLogin/hgLogin.c +++ src/hg/hgLogin/hgLogin.c @@ -318,42 +318,41 @@ if (!returnURL || sameString(returnURL,"")) safef(returnTo, sizeof(returnTo), "http%s://%s%shgSession?hgS_doMainPage=1", cgiAppendSForHttps(), hgLoginHost, cgiDir); else safecpy(returnTo, sizeof(returnTo), returnURL); return cloneString(returnTo); } void returnToURL(int delay) /* delay for delay mill-seconds then return to the "returnto" URL */ { char *returnURL = getReturnToURL(); char javascript[1024]; safef(javascript, sizeof javascript, - "function afterDelay() {window.location = '%s';}\n" - "window.setTimeout(afterDelay, %d);\n" + "setTimeout(function(){location='%s';}, %d);\n" , returnURL, delay); jsInline(javascript); } static void redirectToLoginPage(char *paramStr) /* redirect to hgLogin page with given parameter string */ { char javascript[1024]; safef(javascript, sizeof javascript, - "window.location ='%s?%s'" + "window.location ='%s?%s';\n" , hgLoginUrl, paramStr); jsInline(javascript); } void displayActMailSuccess() /* display Activate mail success box */ { char *returnURL = getReturnToURL(); hPrintf( "
A confirmation email has been sent to you. \n" "Please click the confirmation link in the email to activate your account.
" @@ -384,90 +383,90 @@ redirectToLoginPage("hgLogin.do.displayActMailSuccess=1"); } void displayMailSuccess() /* display mail success confirmation box */ { char *sendMailTo = cartUsualString(cart, "hgLogin_sendMailTo", ""); hPrintf( "All usernames on file (if any) for %s "
"have been sent to that address.
"
" If %s is not your registered email address, you will not receive an email."
" If you can't find the message we sent you, please contact %s for help.
An email containing password reset information has been sent to the registered email address of %s.
"
" If you do not receive an email, please contact %s for help.
If you still have questions, you can contact the Genome Browser team at " "genome-www@soe.ucsc.edu. As this is a mirror website not managed by UCSC, please " "specify the address of the mirror in your email.
"); -hPrintf("", +hPrintf("\n", hgLoginUrl); cartRemove(cart, "hgLogin_helpWith"); cartRemove(cart, "hgLogin_email"); cartRemove(cart, "hgLogin_userName"); cartRemove(cart, "hgLogin_sendMailTo"); cartRemove(cart, "hgLogin_sendMailContain"); } void sendMailOut(char *email, char *subject, char *msg) /* send mail to email address */ { char *obj = cartUsualString(cart, "hgLogin_helpWith", ""); int result; result = mailViaPipe(email, subject, msg, returnAddr); if (result == -1) { hPrintf( "" "
" "" "
" "