summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorMichael Kuhn <suraia@ikkoku.de>2018-05-28 15:38:20 +0200
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-05-28 09:38:20 -0400
commitfd274ffcd9bfdaac210278794ca4d87216868b8a (patch)
treed78c76d39cfd76816784a85d2f4ff05703a8cdbe /routers
parent0be2b34ceccdf9fd79d05c2499a852be4d68cabb (diff)
downloadgitea-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.go4
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