Bläddra i källkod

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.
tags/v1.5.0-dev
Michael Kuhn 6 år sedan
förälder
incheckning
fd274ffcd9
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2
    2
      routers/repo/wiki.go

+ 2
- 2
routers/repo/wiki.go Visa fil

@@ -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

Laddar…
Avbryt
Spara