1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Golint fixed for modules/setting (#262)

* golint fixed for modules/setting

* typo fixed and renamed UNIXSOCKET to UnixSocket
This commit is contained in:
Lunny Xiao
2016-11-27 18:14:25 +08:00
committed by GitHub
parent 0a76d260fa
commit 94da472717
38 changed files with 178 additions and 167 deletions

View File

@@ -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