summaryrefslogtreecommitdiffstats
path: root/routers/repo
diff options
context:
space:
mode:
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
}