aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/wiki.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/wiki.go')
-rw-r--r--routers/web/repo/wiki.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/routers/web/repo/wiki.go b/routers/web/repo/wiki.go
index 4cd5856ea6..0c161568bd 100644
--- a/routers/web/repo/wiki.go
+++ b/routers/web/repo/wiki.go
@@ -15,8 +15,8 @@ import (
"strings"
"time"
- "code.gitea.io/gitea/models"
git_model "code.gitea.io/gitea/models/git"
+ repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/charset"
@@ -164,7 +164,7 @@ func renderViewPage(ctx *context.Context) (*git.Repository, *git.TreeEntry) {
}
wikiName, err := wiki_service.FilenameToName(entry.Name())
if err != nil {
- if models.IsErrWikiInvalidFileName(err) {
+ if repo_model.IsErrWikiInvalidFileName(err) {
continue
}
if wikiRepo != nil {
@@ -588,7 +588,7 @@ func WikiPages(ctx *context.Context) {
}
wikiName, err := wiki_service.FilenameToName(entry.Name())
if err != nil {
- if models.IsErrWikiInvalidFileName(err) {
+ if repo_model.IsErrWikiInvalidFileName(err) {
continue
}
ctx.ServerError("WikiFilenameToName", err)
@@ -693,10 +693,10 @@ func NewWikiPost(ctx *context.Context) {
}
if err := wiki_service.AddWikiPage(ctx, ctx.Doer, ctx.Repo.Repository, wikiName, form.Content, form.Message); err != nil {
- if models.IsErrWikiReservedName(err) {
+ if repo_model.IsErrWikiReservedName(err) {
ctx.Data["Err_Title"] = true
ctx.RenderWithErr(ctx.Tr("repo.wiki.reserved_page", wikiName), tplWikiNew, &form)
- } else if models.IsErrWikiAlreadyExist(err) {
+ } else if repo_model.IsErrWikiAlreadyExist(err) {
ctx.Data["Err_Title"] = true
ctx.RenderWithErr(ctx.Tr("repo.wiki.page_already_exists"), tplWikiNew, &form)
} else {