summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
authorEthan Koenig <etk39@cornell.edu>2017-08-02 01:46:54 -0700
committerLauris BH <lauris@nix.lv>2017-08-02 11:46:54 +0300
commitf29458bd3a20d2d89638d5031d801c161f456374 (patch)
tree959c680d58eb5cfd82d719357759963fa7095fe6 /routers/repo
parent539d9f4c3070abb0f024b133a4f53187a76cbcb7 (diff)
downloadgitea-f29458bd3a20d2d89638d5031d801c161f456374.tar.gz
gitea-f29458bd3a20d2d89638d5031d801c161f456374.zip
EnableUnit() -> UnitEnabled() (#2242)
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/issue.go4
-rw-r--r--routers/repo/wiki.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index f3799fdb99..473e829713 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -59,8 +59,8 @@ var (
// MustEnableIssues check if repository enable internal issues
func MustEnableIssues(ctx *context.Context) {
- if !ctx.Repo.Repository.EnableUnit(models.UnitTypeIssues) &&
- !ctx.Repo.Repository.EnableUnit(models.UnitTypeExternalTracker) {
+ if !ctx.Repo.Repository.UnitEnabled(models.UnitTypeIssues) &&
+ !ctx.Repo.Repository.UnitEnabled(models.UnitTypeExternalTracker) {
ctx.Handle(404, "MustEnableIssues", nil)
return
}
diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go
index 2dcf37cc86..2a73fdc41e 100644
--- a/routers/repo/wiki.go
+++ b/routers/repo/wiki.go
@@ -31,8 +31,8 @@ const (
// MustEnableWiki check if wiki is enabled, if external then redirect
func MustEnableWiki(ctx *context.Context) {
- if !ctx.Repo.Repository.EnableUnit(models.UnitTypeWiki) &&
- !ctx.Repo.Repository.EnableUnit(models.UnitTypeExternalWiki) {
+ if !ctx.Repo.Repository.UnitEnabled(models.UnitTypeWiki) &&
+ !ctx.Repo.Repository.UnitEnabled(models.UnitTypeExternalWiki) {
ctx.Handle(404, "MustEnableWiki", nil)
return
}