Merge "OverflowMenus: Don't pass 'editable' data to reply button overflows"

This commit is contained in:
jenkins-bot 2023-10-12 15:26:02 +00:00 committed by Gerrit Code Review
commit d92515b731

View file

@ -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 = [];