Skip to content

Commit

Permalink
Fix wiki redirects (#3919)
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 0be2b34 commit fd274ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions routers/repo/wiki.go
Original file line number Diff line number Diff line change
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 fd274ff

Please sign in to comment.