mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-09-24 18:58:29 +00:00
Merge "Hygiene: Drop isAuthenticatedUser method"
This commit is contained in:
commit
0d9f6786e4
|
@ -252,7 +252,7 @@ class SkinMinerva extends SkinTemplate {
|
||||||
$className .= ' page-Main_Page ';
|
$className .= ' page-Main_Page ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $this->isAuthenticatedUser() ) {
|
if ( $this->getUser()->isLoggedIn() ) {
|
||||||
$className .= ' is-authenticated';
|
$className .= ' is-authenticated';
|
||||||
}
|
}
|
||||||
// The new treatment should only apply to the main namespace
|
// The new treatment should only apply to the main namespace
|
||||||
|
@ -265,15 +265,6 @@ class SkinMinerva extends SkinTemplate {
|
||||||
return $className;
|
return $className;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Check whether the current user is authenticated or not.
|
|
||||||
* @todo This helper function is only truly needed whilst SkinMobileApp does not support login
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
protected function isAuthenticatedUser() {
|
|
||||||
return $this->getUser()->isLoggedIn();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether the output page contains category links and the category feature is enabled.
|
* Whether the output page contains category links and the category feature is enabled.
|
||||||
* @return bool
|
* @return bool
|
||||||
|
@ -960,7 +951,7 @@ class SkinMinerva extends SkinTemplate {
|
||||||
$styles[] = 'skins.minerva.userpage.styles';
|
$styles[] = 'skins.minerva.userpage.styles';
|
||||||
$styles[] = 'skins.minerva.userpage.icons';
|
$styles[] = 'skins.minerva.userpage.icons';
|
||||||
}
|
}
|
||||||
if ( $this->isAuthenticatedUser() ) {
|
if ( $this->getUser()->isLoggedIn() ) {
|
||||||
$styles[] = 'skins.minerva.loggedin.styles';
|
$styles[] = 'skins.minerva.loggedin.styles';
|
||||||
$styles[] = 'skins.minerva.icons.loggedin';
|
$styles[] = 'skins.minerva.icons.loggedin';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue