Don't split parser cache when reply tool is enabled by default

Bug: T279864
Change-Id: I16f1546e1373311563b8a90d6a025b0b45ffb793
This commit is contained in:
Ed Sanders 2021-04-16 13:29:09 +01:00 committed by Esanders
parent 722a4e5198
commit 888d554ecf

View file

@ -48,8 +48,13 @@ class ParserHooks implements
if (
$dtConfig->get( 'DiscussionToolsUseParserCache' ) &&
HookUtils::isAvailableForTitle( $article->getTitle() ) &&
HookUtils::isFeatureEnabledForUser( $popts->getUser(), HookUtils::REPLYTOOL )
HookUtils::isAvailableForTitle( $article->getTitle() ) && (
// If the reply tool is enabled by default, always apply the DOM transform
// TODO: Check any feature in CommentFormatter::USE_WITH_FEATURES
$dtConfig->get( 'DiscussionTools_' . HookUtils::REPLYTOOL ) === 'available' ||
// ...or if enabled for a specific user
HookUtils::isFeatureEnabledForUser( $popts->getUser(), HookUtils::REPLYTOOL )
)
) {
$popts->setOption( 'dtreply', true );
}