forked from gitea/gitea
1
0
Fork 0

Fix wiki redirects (#3919)

When creating or editing a wiki page, the redirect to the wiki page does
not work because the file name is used instead of the page name.
This commit is contained in:
Michael Kuhn 2018-05-28 15:38:20 +02:00 committed by techknowlogick
parent 0be2b34cec
commit fd274ffcd9
1 changed files with 2 additions and 2 deletions

View File

@ -350,7 +350,7 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) {
return return
} }
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(wikiName)) ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(wikiName))
} }
// EditWiki render wiki modify page // EditWiki render wiki modify page
@ -391,7 +391,7 @@ func EditWikiPost(ctx *context.Context, form auth.NewWikiForm) {
return return
} }
ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(newWikiName)) ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(newWikiName))
} }
// DeleteWikiPagePost delete wiki page // DeleteWikiPagePost delete wiki page