Links to wikipages bound to versions do not respect version-sharing in Settings -> Versions
While reviewing the implementation for issue #4416 I noticed that the links to wikipages bound to versions do not respect version-sharing (introduced in r3123 for issue #465 and enhanced with r3133 for issue #4357) in Settings -> Versions.
This leads to incorrect links when the version does not belong to the current project. More specifically, the links always point to the current project wiki instead of the wiki of the actual versions project.
Another side-effect is that in the
unless-statement again only the current project wiki is checked for existence instead of the actual versions project wiki.