Skip to content

Commit

Permalink
T12565: Stinkily disable transcodes for hommwiki (#5660)
Browse files Browse the repository at this point in the history
Fixes T12565
  • Loading branch information
BlankEclair authored Oct 5, 2024
1 parent aedeabc commit a2d63e7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions LocalWiki.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,18 @@ function onBeforePageDisplay( OutputPage $outputPage ) {

break;
case 'hommwiki':
// T12565: This is a workaround for an upstream bug, please remove when the bug fix is merged
$wgEnabledAudioTranscodeSet = [];

// T12565: This is a code crime to make the workaround for said upstream bug work, I apologize for my sins.
// Yes, [[mw:Manual:Extension.json/Schema#ExtensionFunctions]] states that "extension functions cannot
// be used to programmatically update configuration variables or register hooks", but this brings results and
// the alternative is reflection, so it could be worse.
$wgExtensionFunctions[] = function () {
global $wgEnabledAudioTranscodeSet;
$wgEnabledAudioTranscodeSet = [];
};

break;
case 'houkai2ndwiki':
$wgSpecialPages['Analytics'] = DisabledSpecialPage::getCallback( 'Analytics', 'MatomoAnalytics-disabled' );
Expand Down

0 comments on commit a2d63e7

Please sign in to comment.