diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-27 18:14:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-27 18:14:25 +0800 |
commit | 94da47271701401b6959bfd308d6c74fd30b22e2 (patch) | |
tree | 92a6c3298ab198efa04fbe4409d282da44736640 /routers/repo/setting.go | |
parent | 0a76d260fa16764ab66bf1623b4cd9e9adfdac27 (diff) | |
download | gitea-94da47271701401b6959bfd308d6c74fd30b22e2.tar.gz gitea-94da47271701401b6959bfd308d6c74fd30b22e2.zip |
Golint fixed for modules/setting (#262)
* golint fixed for modules/setting
* typo fixed and renamed UNIXSOCKET to UnixSocket
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index 2b8c5a2315..aaba5427fc 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -194,7 +194,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { } log.Trace("Repository converted from mirror to regular: %s/%s", ctx.Repo.Owner.Name, repo.Name) ctx.Flash.Success(ctx.Tr("repo.settings.convert_succeed")) - ctx.Redirect(setting.AppSubUrl + "/" + ctx.Repo.Owner.Name + "/" + repo.Name) + ctx.Redirect(setting.AppSubURL + "/" + ctx.Repo.Owner.Name + "/" + repo.Name) case "transfer": if !ctx.Repo.IsOwner() { @@ -233,7 +233,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { } log.Trace("Repository transfered: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newOwner) ctx.Flash.Success(ctx.Tr("repo.settings.transfer_succeed")) - ctx.Redirect(setting.AppSubUrl + "/" + newOwner + "/" + repo.Name) + ctx.Redirect(setting.AppSubURL + "/" + newOwner + "/" + repo.Name) case "delete": if !ctx.Repo.IsOwner() { @@ -314,7 +314,7 @@ func Collaboration(ctx *context.Context) { func CollaborationPost(ctx *context.Context) { name := strings.ToLower(ctx.Query("collaborator")) if len(name) == 0 || ctx.Repo.Owner.LowerName == name { - ctx.Redirect(setting.AppSubUrl + ctx.Req.URL.Path) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) return } @@ -322,7 +322,7 @@ func CollaborationPost(ctx *context.Context) { if err != nil { if models.IsErrUserNotExist(err) { ctx.Flash.Error(ctx.Tr("form.user_not_exist")) - ctx.Redirect(setting.AppSubUrl + ctx.Req.URL.Path) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) } else { ctx.Handle(500, "GetUserByName", err) } @@ -332,7 +332,7 @@ func CollaborationPost(ctx *context.Context) { // Organization is not allowed to be added as a collaborator. if u.IsOrganization() { ctx.Flash.Error(ctx.Tr("repo.settings.org_not_allowed_to_be_collaborator")) - ctx.Redirect(setting.AppSubUrl + ctx.Req.URL.Path) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) return } @@ -353,7 +353,7 @@ func CollaborationPost(ctx *context.Context) { } ctx.Flash.Success(ctx.Tr("repo.settings.add_collaborator_success")) - ctx.Redirect(setting.AppSubUrl + ctx.Req.URL.Path) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) } // ChangeCollaborationAccessMode response for changing access of a collaboration |