summaryrefslogtreecommitdiffstats
path: root/routers/admin
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2016-11-27 18:14:25 +0800
committerGitHub <noreply@github.com>2016-11-27 18:14:25 +0800
commit94da47271701401b6959bfd308d6c74fd30b22e2 (patch)
tree92a6c3298ab198efa04fbe4409d282da44736640 /routers/admin
parent0a76d260fa16764ab66bf1623b4cd9e9adfdac27 (diff)
downloadgitea-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/admin')
-rw-r--r--routers/admin/admin.go6
-rw-r--r--routers/admin/auths.go8
-rw-r--r--routers/admin/notice.go2
-rw-r--r--routers/admin/repos.go2
-rw-r--r--routers/admin/users.go10
5 files changed, 14 insertions, 14 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 655c6a30ba..00aca2d09f 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -164,7 +164,7 @@ func Dashboard(ctx *context.Context) {
} else {
ctx.Flash.Success(success)
}
- ctx.Redirect(setting.AppSubUrl + "/admin")
+ ctx.Redirect(setting.AppSubURL + "/admin")
return
}
@@ -185,7 +185,7 @@ func SendTestMail(ctx *context.Context) {
ctx.Flash.Info(ctx.Tr("admin.config.test_mail_sent", email))
}
- ctx.Redirect(setting.AppSubUrl + "/admin/config")
+ ctx.Redirect(setting.AppSubURL + "/admin/config")
}
// Config show admin config page
@@ -194,7 +194,7 @@ func Config(ctx *context.Context) {
ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminConfig"] = true
- ctx.Data["AppUrl"] = setting.AppUrl
+ ctx.Data["AppUrl"] = setting.AppURL
ctx.Data["Domain"] = setting.Domain
ctx.Data["OfflineMode"] = setting.OfflineMode
ctx.Data["DisableRouterLog"] = setting.DisableRouterLog
diff --git a/routers/admin/auths.go b/routers/admin/auths.go
index 4a86e60b54..9e310b8c16 100644
--- a/routers/admin/auths.go
+++ b/routers/admin/auths.go
@@ -167,7 +167,7 @@ func NewAuthSourcePost(ctx *context.Context, form auth.AuthenticationForm) {
log.Trace("Authentication created by admin(%s): %s", ctx.User.Name, form.Name)
ctx.Flash.Success(ctx.Tr("admin.auths.new_success", form.Name))
- ctx.Redirect(setting.AppSubUrl + "/admin/auths")
+ ctx.Redirect(setting.AppSubURL + "/admin/auths")
}
// EditAuthSource render editing auth source page
@@ -236,7 +236,7 @@ func EditAuthSourcePost(ctx *context.Context, form auth.AuthenticationForm) {
log.Trace("Authentication changed by admin(%s): %s", ctx.User.Name, source.ID)
ctx.Flash.Success(ctx.Tr("admin.auths.update_success"))
- ctx.Redirect(setting.AppSubUrl + "/admin/auths/" + com.ToStr(form.ID))
+ ctx.Redirect(setting.AppSubURL + "/admin/auths/" + com.ToStr(form.ID))
}
// DeleteAuthSource response for deleting an auth source
@@ -254,7 +254,7 @@ func DeleteAuthSource(ctx *context.Context) {
ctx.Flash.Error(fmt.Sprintf("DeleteSource: %v", err))
}
ctx.JSON(200, map[string]interface{}{
- "redirect": setting.AppSubUrl + "/admin/auths/" + ctx.Params(":authid"),
+ "redirect": setting.AppSubURL + "/admin/auths/" + ctx.Params(":authid"),
})
return
}
@@ -262,6 +262,6 @@ func DeleteAuthSource(ctx *context.Context) {
ctx.Flash.Success(ctx.Tr("admin.auths.deletion_success"))
ctx.JSON(200, map[string]interface{}{
- "redirect": setting.AppSubUrl + "/admin/auths",
+ "redirect": setting.AppSubURL + "/admin/auths",
})
}
diff --git a/routers/admin/notice.go b/routers/admin/notice.go
index 4e4f0f1e94..2cf71ee070 100644
--- a/routers/admin/notice.go
+++ b/routers/admin/notice.go
@@ -72,5 +72,5 @@ func EmptyNotices(ctx *context.Context) {
log.Trace("System notices deleted by admin (%s): [start: %d]", ctx.User.Name, 0)
ctx.Flash.Success(ctx.Tr("admin.notices.delete_success"))
- ctx.Redirect(setting.AppSubUrl + "/admin/notices")
+ ctx.Redirect(setting.AppSubURL + "/admin/notices")
}
diff --git a/routers/admin/repos.go b/routers/admin/repos.go
index 287c294408..86a9ea9405 100644
--- a/routers/admin/repos.go
+++ b/routers/admin/repos.go
@@ -49,6 +49,6 @@ func DeleteRepo(ctx *context.Context) {
ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success"))
ctx.JSON(200, map[string]interface{}{
- "redirect": setting.AppSubUrl + "/admin/repos?page=" + ctx.Query("page"),
+ "redirect": setting.AppSubURL + "/admin/repos?page=" + ctx.Query("page"),
})
}
diff --git a/routers/admin/users.go b/routers/admin/users.go
index dd4d2f5786..04e331d229 100644
--- a/routers/admin/users.go
+++ b/routers/admin/users.go
@@ -123,7 +123,7 @@ func NewUserPost(ctx *context.Context, form auth.AdminCrateUserForm) {
}
ctx.Flash.Success(ctx.Tr("admin.users.new_success", u.Name))
- ctx.Redirect(setting.AppSubUrl + "/admin/users/" + com.ToStr(u.ID))
+ ctx.Redirect(setting.AppSubURL + "/admin/users/" + com.ToStr(u.ID))
}
func prepareUserInfo(ctx *context.Context) *models.User {
@@ -225,7 +225,7 @@ func EditUserPost(ctx *context.Context, form auth.AdminEditUserForm) {
log.Trace("Account profile updated by admin (%s): %s", ctx.User.Name, u.Name)
ctx.Flash.Success(ctx.Tr("admin.users.update_profile_success"))
- ctx.Redirect(setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"))
+ ctx.Redirect(setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"))
}
// DeleteUser response for deleting a user
@@ -241,12 +241,12 @@ func DeleteUser(ctx *context.Context) {
case models.IsErrUserOwnRepos(err):
ctx.Flash.Error(ctx.Tr("admin.users.still_own_repo"))
ctx.JSON(200, map[string]interface{}{
- "redirect": setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"),
+ "redirect": setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"),
})
case models.IsErrUserHasOrgs(err):
ctx.Flash.Error(ctx.Tr("admin.users.still_has_org"))
ctx.JSON(200, map[string]interface{}{
- "redirect": setting.AppSubUrl + "/admin/users/" + ctx.Params(":userid"),
+ "redirect": setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"),
})
default:
ctx.Handle(500, "DeleteUser", err)
@@ -257,6 +257,6 @@ func DeleteUser(ctx *context.Context) {
ctx.Flash.Success(ctx.Tr("admin.users.deletion_success"))
ctx.JSON(200, map[string]interface{}{
- "redirect": setting.AppSubUrl + "/admin/users",
+ "redirect": setting.AppSubURL + "/admin/users",
})
}