diff options
author | reed%reedloden.com <> | 2006-12-29 01:48:06 +0100 |
---|---|---|
committer | reed%reedloden.com <> | 2006-12-29 01:48:06 +0100 |
commit | 84e36a3d1fea362f08865dd9be817ae16d1da382 (patch) | |
tree | db578b83b553ff8ba4593f64cdecedd50ce83a91 /template/en/default/global | |
parent | e17a0edb7aea89b20bff86173f31d6d5f38cf2b3 (diff) | |
download | bugzilla-84e36a3d1fea362f08865dd9be817ae16d1da382.tar.gz bugzilla-84e36a3d1fea362f08865dd9be817ae16d1da382.tar.xz |
Bug 276565 - ""Log In" link in footer should return to same page after logging in." [p=reed r=justdave a=justdave]
Diffstat (limited to 'template/en/default/global')
-rw-r--r-- | template/en/default/global/common-links.html.tmpl | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/template/en/default/global/common-links.html.tmpl b/template/en/default/global/common-links.html.tmpl index 56de98ce2..dca5d7262 100644 --- a/template/en/default/global/common-links.html.tmpl +++ b/template/en/default/global/common-links.html.tmpl @@ -76,7 +76,30 @@ <li><span class="separator">| </span><a href="createaccount.cgi">New Account</a></li> [% END %] [% IF user.authorizer.can_login %] - <li><span class="separator">| </span><a href="index.cgi?GoAheadAndLogIn=1">Log In</a></li> + [%# Use the current script name. If an empty name is returned, + # then we are accessing the home page. %] + + [% script_name = cgi.url(Relative => 1) %] + + [% IF cgi.request_method == "POST" OR script_name.match("relogin") %] + [% script_name = "" %] + [% END %] + + [%# If SSL is in use, use 'sslbase', else use 'urlbase'. %] + [% IF Param("sslbase") != "" && Param("ssl") != "never" %] + [% script_name = Param("sslbase") _ script_name %] + [% ELSE %] + [% script_name = Param("urlbase") _ script_name %] + [% END %] + + [% IF cgi.request_method == "GET" AND cgi.query_string %] + [% script_name = script_name _ "?" _ cgi.query_string %] + [% script_name = script_name _ "&GoAheadAndLogIn=1" IF !cgi.query_string.match("GoAheadAndLogIn") %] + [% ELSE %] + [% script_name = script_name _ "?GoAheadAndLogIn=1" %] + [% END %] + + <li><span class="separator">| </span><a href="[% script_name FILTER html %]">Log In</a></li> [% END %] [% END %] </ul> |