]> source.dussan.org Git - gitea.git/commitdiff
Use AppSubUrl for more redirections (#8647)
authorzeripath <art27@cantab.net>
Wed, 23 Oct 2019 21:04:22 +0000 (22:04 +0100)
committerGitHub <noreply@github.com>
Wed, 23 Oct 2019 21:04:22 +0000 (22:04 +0100)
Fix #8461 - fix misspelling of {{AppSubUrl}} and other misspelling in template
Fixes /explore and organisation redirection

modules/context/org.go
options/locale/locale_en-US.ini
routers/home.go
templates/user/auth/grant.tmpl

index 48674743340c5cd3f927715d08461c7ac7cecfe0..10791c9d010615f0b0c35b200f4950670e9a538d 100644 (file)
@@ -63,7 +63,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
 
        // Force redirection when username is actually a user.
        if !org.IsOrganization() {
-               ctx.Redirect("/" + org.Name)
+               ctx.Redirect(setting.AppSubURL + "/" + org.Name)
                return
        }
 
index 60acab01783c882b88ab85283f8a3b1e7498edd3..83047ef6f1cc8af45ea1866a0c5085ef96148a9f 100644 (file)
@@ -259,7 +259,7 @@ openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.op
 disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator.
 email_domain_blacklisted = You cannot register with your email address.
 authorize_application = Authorize Application
-authroize_redirect_notice = You will be redirected to %s if you authorize this application.
+authorize_redirect_notice = You will be redirected to %s if you authorize this application.
 authorize_application_created_by = This application was created by %s.
 authorize_application_description = If you grant the access, it will be able to access and write to all your account information, including private repos and organisations.
 authorize_title = Authorize "%s" to access your account?
index f8fb849c8e17b04576ba832ba55373420d4821e6..eddff28ee99658ee77c9e648c3a3d4d98f5407f2 100644 (file)
@@ -273,7 +273,7 @@ func ExploreOrganizations(ctx *context.Context) {
 // ExploreCode render explore code page
 func ExploreCode(ctx *context.Context) {
        if !setting.Indexer.RepoIndexerEnabled {
-               ctx.Redirect("/explore", 302)
+               ctx.Redirect(setting.AppSubURL+"/explore", 302)
                return
        }
 
index 85c507a74a6e3f71fc670fe1113570908d668994..b67bfa110c1f48e317b57dba75d0f9d46d2f78dd 100644 (file)
                                </p>
                        </div>
                        <div class="ui attached segment">
-                               <p>{{.i18n.Tr "auth.authroize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p>
+                               <p>{{.i18n.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p>
                        </div>
                        <div class="ui attached segment">
-                               <form method="post" action="{{.AppSubUrl}}/login/oauth/grant">
+                               <form method="post" action="{{AppSubUrl}}/login/oauth/grant">
                                        {{.CsrfTokenHtml}}
                                        <input type="hidden" name="client_id" value="{{.Application.ClientID}}">
                                        <input type="hidden" name="state" value="{{.State}}">