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

Two fixes: broken links to docs and preferred language selection #1324

Merged
merged 2 commits into from Nov 11, 2019

Conversation

flaix
Copy link
Member

@flaix flaix commented Nov 11, 2019

I found some minor fixes in this forked branch: yumine-cc/gitblit-spring-boot:gitblit-spring-boot.
https://github.com/yumine-cc/gitblit-spring-boot/tree/gitblit-spring-boot
I extracted two, respectively used the information to find the problems and fix them.

If, for example, an external site links to a docs page or a specific
doc page, and the branch that link points to is no longer existing,
an internal error happens due to a NPE.

The NPE is guarded against and a No Docs page is returned.
Due to a wrong comparison, when loading the preferred locale in the
user preferences page, in cases like `zh_CN` or `de_DE` the wrong
locale would be chosen.

As with too many things, the code is duplicated on the `UserPage`
and the `EditUserPage`. And they differ. So extract the choosing of
the preferred language for display into a method in the (more up-to-date)
`UserPage` and call that from the `EditUserPage`.
@flaix flaix added this to the 1.9.0 milestone Nov 11, 2019
@flaix flaix merged commit 96a7e6e into gitblit-org:master Nov 11, 2019
@flaix flaix deleted the fix-prefLocale-docsNPE branch November 11, 2019 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants