mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-23 23:24:39 +00:00
Enable Reference Previews for more users
Registered users see reference previews by default, and anonymous
users by default when not in beta feature mode.
Cherry-picked from I28c43ab3348ffdc27b068fc1ac1d6a6a06ee90a6
and 1fce62ca7b
.
The behavior for PagePreviews – implemented years ago – was
different. For old users it was disabled by default. This
behavior is wrong for ReferencePreviews.
Bug: T271206
Change-Id: I28c43ab3348ffdc27b068fc1ac1d6a6a06ee90a6
This commit is contained in:
parent
a438b641c8
commit
8f1f7f2095
|
@ -158,6 +158,12 @@ class PopupsContext {
|
|||
self::REFERENCE_PREVIEWS_PREFERENCE_NAME
|
||||
);
|
||||
}
|
||||
|
||||
// if not in Beta then enable for anonymous users
|
||||
if ( $user->isAnon() ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return $user->getBoolOption( self::REFERENCE_PREVIEWS_PREFERENCE_NAME_AFTER_BETA );
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ class PopupsHooks {
|
|||
if ( $config->get( 'PopupsReferencePreviews' ) &&
|
||||
!$config->get( 'PopupsReferencePreviewsBetaFeature' )
|
||||
) {
|
||||
$defaultOptions[PopupsContext::REFERENCE_PREVIEWS_PREFERENCE_NAME_AFTER_BETA] = $default;
|
||||
$defaultOptions[PopupsContext::REFERENCE_PREVIEWS_PREFERENCE_NAME_AFTER_BETA] = '1';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue