From b8d5e3fac5cb40a5f4395c7efdd9eee5d2ff3eb7 Mon Sep 17 00:00:00 2001 From: Piotr Miazga Date: Fri, 21 Jun 2019 19:18:27 +0200 Subject: [PATCH] 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 --- includes/skins/SkinMinerva.php | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php index 7f036a5..c7cdac6 100644 --- a/includes/skins/SkinMinerva.php +++ b/includes/skins/SkinMinerva.php @@ -252,7 +252,7 @@ class SkinMinerva extends SkinTemplate { $className .= ' page-Main_Page '; } - if ( $this->isAuthenticatedUser() ) { + if ( $this->getUser()->isLoggedIn() ) { $className .= ' is-authenticated'; } // The new treatment should only apply to the main namespace @@ -265,15 +265,6 @@ class SkinMinerva extends SkinTemplate { 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. * @return bool @@ -960,7 +951,7 @@ class SkinMinerva extends SkinTemplate { $styles[] = 'skins.minerva.userpage.styles'; $styles[] = 'skins.minerva.userpage.icons'; } - if ( $this->isAuthenticatedUser() ) { + if ( $this->getUser()->isLoggedIn() ) { $styles[] = 'skins.minerva.loggedin.styles'; $styles[] = 'skins.minerva.icons.loggedin'; }