diff options
author | Michael Kuhn <suraia@ikkoku.de> | 2018-05-28 15:38:20 +0200 |
---|---|---|
committer | techknowlogick <techknowlogick@users.noreply.github.com> | 2018-05-28 09:38:20 -0400 |
commit | fd274ffcd9bfdaac210278794ca4d87216868b8a (patch) | |
tree | d78c76d39cfd76816784a85d2f4ff05703a8cdbe /routers | |
parent | 0be2b34ceccdf9fd79d05c2499a852be4d68cabb (diff) | |
download | gitea-fd274ffcd9bfdaac210278794ca4d87216868b8a.tar.gz gitea-fd274ffcd9bfdaac210278794ca4d87216868b8a.zip |
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.
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/wiki.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routers/repo/wiki.go b/routers/repo/wiki.go index 87cb9f3037..3220ab134d 100644 --- a/routers/repo/wiki.go +++ b/routers/repo/wiki.go @@ -350,7 +350,7 @@ func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) { return } - ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(wikiName)) + ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(wikiName)) } // EditWiki render wiki modify page @@ -391,7 +391,7 @@ func EditWikiPost(ctx *context.Context, form auth.NewWikiForm) { return } - ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToFilename(newWikiName)) + ctx.Redirect(ctx.Repo.RepoLink + "/wiki/" + models.WikiNameToSubURL(newWikiName)) } // DeleteWikiPagePost delete wiki page |