]> source.dussan.org Git - gitea.git/commitdiff
Fix login redirection links (#17451)
authorqwerty287 <80460567+qwerty287@users.noreply.github.com>
Thu, 28 Oct 2021 10:09:25 +0000 (12:09 +0200)
committerGitHub <noreply@github.com>
Thu, 28 Oct 2021 10:09:25 +0000 (18:09 +0800)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: zeripath <art27@cantab.net>
templates/base/head_navbar.tmpl

index c370b70f29878f2c78ff315544f890a1639023ac..348e7671a57e06a922d8be64bea3c2453c4f46ef 100644 (file)
                                        {{svg "octicon-person"}} {{.i18n.Tr "register"}}
                                </a>
                        {{end}}
-                       <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.CurrentURL}}">
+                       <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login{{if not .PageIsSignIn}}?redirect_to={{.CurrentURL}}{{end}}">
                                {{svg "octicon-sign-in"}} {{.i18n.Tr "sign_in"}}
                        </a>
                </div><!-- end anonymous right menu -->