mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-11 17:02:28 +00:00
OverflowMenus: Don't pass 'editable' data to reply button overflows
'editable' refers to the section being editable, and is only for use by heading items, not individual comments. Change-Id: I3fb5841609c40a928071cea8987cf035ade464c2
This commit is contained in:
parent
fb8aaca7a7
commit
52db0af5cf
|
@ -300,8 +300,7 @@ class CommentFormatter {
|
|||
$lastTimestamp->surroundContents( $link );
|
||||
}
|
||||
}
|
||||
$editable = DOMCompat::querySelector( $replyButtons, 'mw\\:editsection' ) !== null;
|
||||
self::addOverflowMenuButton( $threadItem, $doc, $replyButtons, [ 'editable' => $editable ] );
|
||||
self::addOverflowMenuButton( $threadItem, $doc, $replyButtons );
|
||||
}
|
||||
|
||||
$range->insertNode( $startMarker );
|
||||
|
@ -748,7 +747,7 @@ class CommentFormatter {
|
|||
static function ( $matches ) use ( $contextSource ) {
|
||||
$overflowMenuData = json_decode( htmlspecialchars_decode( $matches[1] ), true ) ?? [];
|
||||
|
||||
$isSectionEditable = $overflowMenuData['editable'];
|
||||
$isSectionEditable = $overflowMenuData['editable'] ?? false;
|
||||
// TODO: Remove the fallback to empty array after the parser cache is updated.
|
||||
$threadItem = $overflowMenuData['threadItem'] ?? [];
|
||||
$overflowMenuItems = [];
|
||||
|
|
Loading…
Reference in a new issue