@@ -33,6 +33,7 @@ import (
3333	"code.gitea.io/gitea/services/forms" 
3434	git_service "code.gitea.io/gitea/services/git" 
3535	notify_service "code.gitea.io/gitea/services/notify" 
36+ 	repo_service "code.gitea.io/gitea/services/repository" 
3637	wiki_service "code.gitea.io/gitea/services/wiki" 
3738)
3839
@@ -474,7 +475,7 @@ func Wiki(ctx *context.Context) {
474475		return 
475476	}
476477
477- 	if  ! ctx .Repo .Repository . HasWiki ( ) {
478+ 	if  ! repo_service . HasWiki ( ctx ,  ctx .Repo .Repository ) {
478479		ctx .Data ["Title" ] =  ctx .Tr ("repo.wiki" )
479480		ctx .HTML (http .StatusOK , tplWikiStart )
480481		return 
@@ -510,7 +511,7 @@ func Wiki(ctx *context.Context) {
510511func  WikiRevision (ctx  * context.Context ) {
511512	ctx .Data ["CanWriteWiki" ] =  ctx .Repo .CanWrite (unit .TypeWiki ) &&  ! ctx .Repo .Repository .IsArchived 
512513
513- 	if  ! ctx .Repo .Repository . HasWiki ( ) {
514+ 	if  ! repo_service . HasWiki ( ctx ,  ctx .Repo .Repository ) {
514515		ctx .Data ["Title" ] =  ctx .Tr ("repo.wiki" )
515516		ctx .HTML (http .StatusOK , tplWikiStart )
516517		return 
@@ -540,7 +541,7 @@ func WikiRevision(ctx *context.Context) {
540541
541542// WikiPages render wiki pages list page 
542543func  WikiPages (ctx  * context.Context ) {
543- 	if  ! ctx .Repo .Repository . HasWiki ( ) {
544+ 	if  ! repo_service . HasWiki ( ctx ,  ctx .Repo .Repository ) {
544545		ctx .Redirect (ctx .Repo .RepoLink  +  "/wiki" )
545546		return 
546547	}
@@ -648,7 +649,7 @@ func WikiRaw(ctx *context.Context) {
648649func  NewWiki (ctx  * context.Context ) {
649650	ctx .Data ["Title" ] =  ctx .Tr ("repo.wiki.new_page" )
650651
651- 	if  ! ctx .Repo .Repository . HasWiki ( ) {
652+ 	if  ! repo_service . HasWiki ( ctx ,  ctx .Repo .Repository ) {
652653		ctx .Data ["title" ] =  "Home" 
653654	}
654655	if  ctx .FormString ("title" ) !=  ""  {
@@ -701,7 +702,7 @@ func NewWikiPost(ctx *context.Context) {
701702func  EditWiki (ctx  * context.Context ) {
702703	ctx .Data ["PageIsWikiEdit" ] =  true 
703704
704- 	if  ! ctx .Repo .Repository . HasWiki ( ) {
705+ 	if  ! repo_service . HasWiki ( ctx ,  ctx .Repo .Repository ) {
705706		ctx .Redirect (ctx .Repo .RepoLink  +  "/wiki" )
706707		return 
707708	}
0 commit comments