Skip to content

Commit

Permalink
Fix conflict with extensions that use ImagePageAfterImageLinks hook
Browse files Browse the repository at this point in the history
In this hook, $html might already contain widgets from other extensions,
such as Extension:GlobalUsage, so we shouldn't overwrite existing value.
  • Loading branch information
edwardspec committed Oct 8, 2024
1 parent 0f278f5 commit eefa69c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/Hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function onImagePageAfterImageLinks( $imagePage, &$html ) {
// @phan-suppress-next-line SecurityCheck-DoubleEscaped
$widgetHtml = Xml::element( 'pre', null, $widgetWikitext );

$html = Xml::tags( 'div', [ 'class' => $wrapperClass ], $widgetHtml );
$html .= Xml::tags( 'div', [ 'class' => $wrapperClass ], $widgetHtml );
$out = RequestContext::getMain()->getOutput();
$out->addModuleStyles( [ 'ext.relatedimages.css' ] );
$out->addModules( [ 'ext.relatedimages' ] );
Expand Down

0 comments on commit eefa69c

Please sign in to comment.