mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-15 03:34:25 +00:00
f8ffcd20d2
Changes to the use statements done automatically via script Addition of missing use statements done manually Change-Id: I9b8f447ea4d715bc815cc782184bca288ee001a0
32 lines
820 B
PHP
32 lines
820 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Skins\Vector;
|
|
|
|
use MediaWiki\Extension\CentralAuth\Hooks\CentralAuthIsUIReloadRecommendedHook;
|
|
use MediaWiki\User\Options\UserOptionsLookup;
|
|
use MediaWiki\User\User;
|
|
|
|
/**
|
|
* @package Vector
|
|
* @internal
|
|
*/
|
|
class CentralAuthHooks implements CentralAuthIsUIReloadRecommendedHook {
|
|
|
|
private UserOptionsLookup $userOptionsLookup;
|
|
|
|
public function __construct( UserOptionsLookup $userOptionsLookup ) {
|
|
$this->userOptionsLookup = $userOptionsLookup;
|
|
}
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function onCentralAuthIsUIReloadRecommended( User $user, bool &$recommendReload ) {
|
|
if ( $this->userOptionsLookup->getDefaultOption( 'skin' ) === Constants::SKIN_NAME_MODERN ) {
|
|
// Vector 2022 does not support updating the UI without reloading the page (T345112)
|
|
$recommendReload = true;
|
|
}
|
|
}
|
|
|
|
}
|