Respect CheckUser permissions when linking
Links to [[Special:CheckUser]] and [[Special:CheckUserLog]]
where shown regardless whether the actual user
had 'checkuser' and 'checkuser-log' permissions.
It is normally not a problem since the 'checkuser'
default group has both permissions, but if one
of the abovementioned permissions is taken away
links point to the "Permissions errors" page.
- Introduce CheckUserBase class to reduce copy+paste and boilerplate code in CheckUser and SpecialCheckUserLog classes
- Now every class is responsible for knowing its own special page Title, which can be accessed using static method "title()". This way ugly and redundant getCheckUserFormTitle() and getCheckUserLogTitle() can be avoided.
- CheckUser and SpecialCheckUserLog are now responsible for producing links to themselves.
Static methods have been added to facilitate easy linking to the checkuser form and the log:
CheckUser::linkMsg, CheckUser::linkIP, CheckUser::linkSubIP, CheckUser::linkXFFIP SpecialCheckUserLOg::linkTargetMsg
Those methods are responsible for checking permissions, therefore they accepts User object as their first parameter.
Interface messages and i18n:
- rename "checkuser-log-return" to "checkuser-log-main-form" since we are not longer returning somewhere since Special:CheckUserLog is a special page on its own
- use "Go to CheckUser main form" instead of "Switch..."
- document "checkuser-contribs" while we are dealing with links