Skip to content

Commit

Permalink
Fix wiki redirects (#3919) (#4065)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
michaelkuhn authored and techknowlogick committed May 28, 2018
1 parent dec663c commit 2d0db24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routers/repo/wiki.go
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2d0db24

Please sign in to comment.