*
* @param OutputPage $out
*/
- function setupSkinUserCss( OutputPage $out ) {
+ public function setupSkinUserCss( OutputPage $out ) {
$moduleStyles = [
'mediawiki.legacy.shared',
'mediawiki.legacy.commonPrint',
$tpl->set( 'charset', 'UTF-8' );
$tpl->setRef( 'wgScript', $wgScript );
$tpl->setRef( 'skinname', $this->skinname );
- $tpl->set( 'skinclass', get_class( $this ) );
+ $tpl->set( 'skinclass', static::class );
$tpl->setRef( 'skin', $this );
$tpl->setRef( 'stylename', $this->stylename );
$tpl->set( 'printable', $out->isPrintable() );
/* set up the default links for the personal toolbar */
$personal_urls = [];
- # Due to bug 32276, if a user does not have read permissions,
+ # Due to T34276, if a user does not have read permissions,
# $this->getTitle() will just give Special:Badtitle, which is
# not especially useful as a returnto parameter. Use the title
# from the request instead, if there was one.
'text' => $this->msg( 'pt-userlogout' )->text(),
'href' => self::makeSpecialUrl( 'Userlogout',
// userlogout link must always contain an & character, otherwise we might not be able
- // to detect a buggy precaching proxy (bug 17790)
+ // to detect a buggy precaching proxy (T19790)
$title->isSpecial( 'Preferences' ) ? 'noreturnto' : $returnto ),
'active' => false
];
$content_navigation['namespaces']['special'] = [
'class' => 'selected',
'text' => $this->msg( 'nstab-special' )->text(),
- 'href' => $request->getRequestURL(), // @see: bug 2457, bug 2510
+ 'href' => $request->getRequestURL(), // @see: T4457, T4510
'context' => 'subject'
];
'href' => $this->getTitle()->getLocalURL( "action=info" )
];
- if ( $this->getTitle()->exists() ) {
+ if ( $this->getTitle()->exists() || $this->getTitle()->inNamespace( NS_CATEGORY ) ) {
$nav_urls['recentchangeslinked'] = [
'href' => SpecialPage::getTitleFor( 'Recentchangeslinked', $this->thispage )->getLocalURL()
];
if ( !$user->isAnon() ) {
$sur = new UserrightsPage;
$sur->setContext( $this->getContext() );
- $canChange = $sur->userCanChangeRights( $this->getUser(), false );
+ $canChange = $sur->userCanChangeRights( $user );
$nav_urls['userrights'] = [
'text' => $this->msg(
$canChange ? 'tool-link-userrights' : 'tool-link-userrights-readonly',
- $this->getUser()->getName()
+ $rootUser
)->text(),
'href' => self::makeSpecialUrlSubpage( 'Userrights', $rootUser )
];