mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 09:43:30 +00:00
Merge "Always set a value for isEmptyTalkPage when transforming html"
This commit is contained in:
commit
936ba19113
|
@ -410,9 +410,12 @@ class CommentFormatter {
|
|||
->addTrackingCategory( $pout, 'discussiontools-comments-before-first-heading-category', $title );
|
||||
}
|
||||
|
||||
if ( count( $threadItems ) === 0 ) {
|
||||
$pout->setExtensionData( 'DiscussionTools-isEmptyTalkPage', true );
|
||||
}
|
||||
// FIXME: Similar to `setJsConfigVar` below, this will eventually throw
|
||||
// from Parsoid's calls to the legacy parser for extension content parsing
|
||||
$pout->setExtensionData(
|
||||
'DiscussionTools-isEmptyTalkPage',
|
||||
count( $threadItems ) === 0
|
||||
);
|
||||
|
||||
$threadsJSON = array_map( static function ( ContentThreadItem $item ) {
|
||||
return $item->jsonSerialize( true );
|
||||
|
|
Loading…
Reference in a new issue