mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-23 16:06:53 +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 );
|
->addTrackingCategory( $pout, 'discussiontools-comments-before-first-heading-category', $title );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( count( $threadItems ) === 0 ) {
|
// FIXME: Similar to `setJsConfigVar` below, this will eventually throw
|
||||||
$pout->setExtensionData( 'DiscussionTools-isEmptyTalkPage', true );
|
// 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 ) {
|
$threadsJSON = array_map( static function ( ContentThreadItem $item ) {
|
||||||
return $item->jsonSerialize( true );
|
return $item->jsonSerialize( true );
|
||||||
|
|
Loading…
Reference in a new issue