Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wiki redirects #3919

Merged
merged 1 commit into from
May 28, 2018
Merged

Fix wiki redirects #3919

merged 1 commit into from
May 28, 2018

Conversation

michaelkuhn
Copy link
Contributor

@michaelkuhn michaelkuhn commented May 8, 2018

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.

This happens on our instance since upgrading to Gitea 1.4. If the PR is okay, I will also prepare a backport for 1.4.

@codecov-io
Copy link

codecov-io commented May 8, 2018

Codecov Report

Merging #3919 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3919   +/-   ##
=======================================
  Coverage   19.96%   19.96%           
=======================================
  Files         153      153           
  Lines       30478    30478           
=======================================
  Hits         6086     6086           
  Misses      23479    23479           
  Partials      913      913
Impacted Files Coverage Δ
routers/repo/wiki.go 42.95% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0be2b34...292c204. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 8, 2018
@lafriks lafriks added this to the 1.5.0 milestone May 8, 2018
@@ -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/" + wikiName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think WikiNameToSubURL should be here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I missed this function completely. :-) I have pushed an updated version of the PR.

@techknowlogick techknowlogick modified the milestones: 1.5.0, 1.6.0 May 27, 2018
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.
@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 28, 2018
@lafriks lafriks modified the milestones: 1.6.0, 1.5.0 May 28, 2018
@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 28, 2018
@techknowlogick techknowlogick merged commit fd274ff into go-gitea:master May 28, 2018
techknowlogick pushed a commit that referenced this pull request May 28, 2018
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.
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants