mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 08:55:20 +02:00
EnableUnit() -> UnitEnabled() (#2242)
This commit is contained in:
parent
539d9f4c30
commit
f29458bd3a
9 changed files with 29 additions and 36 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue