diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-19 20:11:34 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-19 20:11:34 -0400 |
commit | 7ba9257a7ff659417501baf7358216555cebcd86 (patch) | |
tree | ffc842cec4165d1069220ae16e08a0b824952f4b /routers/org | |
parent | 6a7bd097fe2b3e894830fc3fdb60dde5594b61d6 (diff) | |
download | gitea-7ba9257a7ff659417501baf7358216555cebcd86.tar.gz gitea-7ba9257a7ff659417501baf7358216555cebcd86.zip |
Add suburl support
Diffstat (limited to 'routers/org')
-rw-r--r-- | routers/org/members.go | 2 | ||||
-rw-r--r-- | routers/org/org.go | 2 | ||||
-rw-r--r-- | routers/org/setting.go | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/routers/org/members.go b/routers/org/members.go index d3bd51eae8..f571e334e1 100644 --- a/routers/org/members.go +++ b/routers/org/members.go @@ -87,7 +87,7 @@ func MembersAction(ctx *middleware.Context) { if ctx.Params(":action") != "leave" { ctx.Redirect(ctx.Org.OrgLink + "/members") } else { - ctx.Redirect(setting.AppRootSubUrl + "/") + ctx.Redirect(setting.AppSubUrl + "/") } } diff --git a/routers/org/org.go b/routers/org/org.go index cea70823af..ab589832d1 100644 --- a/routers/org/org.go +++ b/routers/org/org.go @@ -83,5 +83,5 @@ func CreatePost(ctx *middleware.Context, form auth.CreateOrgForm) { } log.Trace("Organization created: %s", org.Name) - ctx.Redirect(setting.AppRootSubUrl + "/org/" + form.OrgName + "/dashboard") + ctx.Redirect(setting.AppSubUrl + "/org/" + form.OrgName + "/dashboard") } diff --git a/routers/org/setting.go b/routers/org/setting.go index 3d397c0c66..0522f99803 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -49,7 +49,7 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateOrgSettingForm) { } else if err = models.ChangeUserName(org, form.OrgUserName); err != nil { if err == models.ErrUserNameIllegal { ctx.Flash.Error(ctx.Tr("form.illegal_username")) - ctx.Redirect(setting.AppRootSubUrl + "/org/" + org.LowerName + "/settings") + ctx.Redirect(setting.AppSubUrl + "/org/" + org.LowerName + "/settings") return } else { ctx.Handle(500, "ChangeUserName", err) @@ -73,7 +73,7 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateOrgSettingForm) { } log.Trace("Organization setting updated: %s", org.Name) ctx.Flash.Success(ctx.Tr("org.settings.update_setting_success")) - ctx.Redirect(setting.AppRootSubUrl + "/org/" + org.Name + "/settings") + ctx.Redirect(setting.AppSubUrl + "/org/" + org.Name + "/settings") } func SettingsDelete(ctx *middleware.Context) { @@ -87,13 +87,13 @@ func SettingsDelete(ctx *middleware.Context) { switch err { case models.ErrUserOwnRepos: ctx.Flash.Error(ctx.Tr("form.org_still_own_repo")) - ctx.Redirect(setting.AppRootSubUrl + "/org/" + org.LowerName + "/settings/delete") + ctx.Redirect(setting.AppSubUrl + "/org/" + org.LowerName + "/settings/delete") default: ctx.Handle(500, "DeleteOrganization", err) } } else { log.Trace("Organization deleted: %s", ctx.User.Name) - ctx.Redirect(setting.AppRootSubUrl + "/") + ctx.Redirect(setting.AppSubUrl + "/") } return } |