mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-24 00:13:36 +00:00
Add topic containers HTML to parser cache even when feature is disabled
Remove hacks marked as 'TEMPORARY' now that we consider the HTML to be stable enough. This will avoid issues with HTML/CSS being out of sync in future deployments. Bug: T313560 Change-Id: Ie00ff38a422f241add19d500adaf22dfeee10e8c
This commit is contained in:
parent
a9ad7dbb24
commit
5e2b209314
|
@ -105,14 +105,6 @@ class CommentFormatter {
|
|||
$subscribeButton = $doc->createComment( '__DTSUBSCRIBEBUTTONDESKTOP__' . $headingNameEscaped );
|
||||
$headingElement->insertBefore( $subscribeButton, $headingElement->firstChild );
|
||||
|
||||
// TEMPORARY: If enhancements are "unavailable", don't modify the HTML at all
|
||||
// so as to avoid polluting the parser cache. Once the HTML output is more stable
|
||||
// this can be removed.
|
||||
$dtConfig = MediaWikiServices::getInstance()->getConfigFactory()->makeConfig( 'discussiontools' );
|
||||
if ( $dtConfig->get( 'DiscussionTools_' . HookUtils::VISUALENHANCEMENTS ) === 'unavailable' ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Visual enhancements: topic containers
|
||||
$summary = $headingItem->getThreadSummary();
|
||||
if ( $summary['commentCount'] ) {
|
||||
|
|
|
@ -275,9 +275,7 @@ class HookUtils {
|
|||
// Extra hack for parses from API, where this parameter isn't passed to derivative requests
|
||||
RequestContext::getMain()->getRequest()->getRawVal( 'dtenable' );
|
||||
|
||||
// TEMPORARY: Don't enable visualenhancements by query as the HTML in the parser
|
||||
// cache will not have been modified (see CommentFormatter::addTopicContainer)
|
||||
if ( $queryEnable && $feature !== static::VISUALENHANCEMENTS ) {
|
||||
if ( $queryEnable ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue