Hygiene: Drop isAuthenticatedUser method
Is used only in Minerva, and it's so simple, there is no need to have a special function for that (no improvement no performance, nor readability) Change-Id: Id5a4edb077671dc12f58df31273f00a1a816f097
This commit is contained in:
parent
6352190684
commit
b8d5e3fac5
|
@ -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 New Issue