mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-24 06:13:54 +00:00
Use User->isRegistered(), not deprecated isLoggedIn()
Bug: T270450 Change-Id: I60f714f42848898cf27aa83da92ac1c691fe5ead
This commit is contained in:
parent
8e96c0320c
commit
592e1151b7
|
@ -40,7 +40,7 @@ final class AuthMenuEntry extends CompositeMenuEntry implements IProfileMenuEntr
|
|||
User $user, MessageLocalizer $messageLocalizer, array $authLinksQuery
|
||||
) {
|
||||
$this->profileMenuEntry = new ProfileMenuEntry( $user );
|
||||
$entries = $user->isLoggedIn()
|
||||
$entries = $user->isRegistered()
|
||||
? [
|
||||
$this->profileMenuEntry,
|
||||
new LogOutMenuEntry(
|
||||
|
|
|
@ -110,7 +110,7 @@ final class DefaultMainMenuBuilder implements IMainMenuBuilder {
|
|||
|
||||
$this->definitions->insertAuthMenuItem( $group );
|
||||
|
||||
if ( $this->user->isLoggedIn() ) {
|
||||
if ( $this->user->isRegistered() ) {
|
||||
$this->definitions->insertWatchlistMenuItem( $group );
|
||||
$this->definitions->insertContributionsMenuItem( $group );
|
||||
}
|
||||
|
|
|
@ -236,7 +236,7 @@ class ToolbarBuilder {
|
|||
* @throws MWException
|
||||
*/
|
||||
protected function createWatchPageAction(): IMenuEntry {
|
||||
$isWatched = $this->user->isLoggedIn() && $this->user->isWatched( $this->title );
|
||||
$isWatched = $this->user->isRegistered() && $this->user->isWatched( $this->title );
|
||||
$isTempWatched = $this->watchlistExpiryEnabled &&
|
||||
$isWatched &&
|
||||
$this->user->isTempWatched( $this->title );
|
||||
|
|
|
@ -186,7 +186,7 @@ class MinervaHooks {
|
|||
// if no warning message set.
|
||||
if (
|
||||
!$request->getVal( 'warning' ) &&
|
||||
!$special->getUser()->isLoggedIn() &&
|
||||
!$special->getUser()->isRegistered() &&
|
||||
!$request->wasPosted()
|
||||
) {
|
||||
$request->setVal( 'warning', 'mobile-frontend-generic-login-new' );
|
||||
|
|
|
@ -187,7 +187,7 @@ final class MinervaPagePermissions implements IMinervaPagePermissions {
|
|||
|
||||
return $this->isAllowed( self::TALK ) &&
|
||||
( $this->title->isTalkPage() || $this->title->canHaveTalkPage() ) &&
|
||||
$this->user->isLoggedIn();
|
||||
$this->user->isRegistered();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -240,7 +240,7 @@ class SkinMinerva extends SkinMustache {
|
|||
$className .= ' page-Main_Page ';
|
||||
}
|
||||
|
||||
if ( $this->getUser()->isLoggedIn() ) {
|
||||
if ( $this->getUser()->isRegistered() ) {
|
||||
$className .= ' is-authenticated';
|
||||
}
|
||||
// The new treatment should only apply to the main namespace
|
||||
|
@ -288,7 +288,7 @@ class SkinMinerva extends SkinMustache {
|
|||
$notificationIconClass = MinervaUI::iconClass( 'bellOutline-base20',
|
||||
'element', '', 'wikimedia' );
|
||||
|
||||
if ( $user->isLoggedIn() ) {
|
||||
if ( $user->isRegistered() ) {
|
||||
$badge = Html::element( 'a', [
|
||||
'class' => $notificationIconClass,
|
||||
'href' => SpecialPage::getTitleFor( 'Mytalk' )->getLocalURL(
|
||||
|
@ -543,7 +543,7 @@ class SkinMinerva extends SkinMustache {
|
|||
$pageTitle = '';
|
||||
$msg = $this->msg( 'mobile-frontend-logged-in-homepage-notification', $user->getName() );
|
||||
|
||||
if ( $user->isLoggedIn() && !$msg->isDisabled() ) {
|
||||
if ( $user->isRegistered() && !$msg->isDisabled() ) {
|
||||
$pageTitle = $msg->text();
|
||||
}
|
||||
|
||||
|
@ -822,7 +822,7 @@ class SkinMinerva extends SkinMustache {
|
|||
$styles[] = 'skins.minerva.talk.styles';
|
||||
}
|
||||
|
||||
if ( $this->getUser()->isLoggedIn() ) {
|
||||
if ( $this->getUser()->isRegistered() ) {
|
||||
$styles[] = 'skins.minerva.loggedin.styles';
|
||||
$styles[] = 'skins.minerva.icons.loggedin';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue