hooks: Don't send config variables unnecessarily
The wgVectorDisableSidebarPersistence config variable is only required when the user is logged in. Don't send it to the client when the user is logged out. Bug: T255727 Change-Id: I27eda8c18b438ef3251b2c07a0ed8b0cef6cae64
This commit is contained in:
parent
a03a19f7af
commit
75ade04dfc
|
@ -295,10 +295,12 @@ class Hooks {
|
|||
* @param OutputPage $out OutputPage instance calling the hook
|
||||
*/
|
||||
public static function onMakeGlobalVariablesScript( &$vars, OutputPage $out ) {
|
||||
if ( $out->getSkin() instanceof SkinVector ) {
|
||||
$user = $out->getUser();
|
||||
|
||||
if ( $out->getSkin() instanceof SkinVector && $user->isRegistered() ) {
|
||||
$skinVersionLookup = new SkinVersionLookup(
|
||||
$out->getRequest(),
|
||||
$out->getUser(),
|
||||
$user,
|
||||
self::getServiceConfig()
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue