Merge "hooks: Don't send config variables unnecessarily"

This commit is contained in:
jenkins-bot 2020-08-17 20:44:34 +00:00 committed by Gerrit Code Review
commit 95896ff703
1 changed files with 4 additions and 2 deletions

View File

@ -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()
);