Page MenuHomePhabricator

Reset default wgScoreTrim to true
Closed, DuplicatePublic

Description

When we enabled Musical Notation, we also enabled score trimming, but changed the default value of wgScoreTrim from null to false.

When wgScoreTrim is set to null, it is then set to the value of wgUseImageMagic in ScoreHooks.php:21 which at this point always true (set in CommonSettings.php:513).

We can either set the default again to null or to true to make explicit that we want to trim by default, rather than rely on an implicit hidden non-descriptive (use image magic != trimming) global variable for this case.

AC

  • Change wgScoreTrim default value to true
  • Remove unnecessary code from ScoreHook.php?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 19 2019, 8:03 AM
alaa_wmde renamed this task from Reset default wgScoreTrim to `null` to Reset default wgScoreTrim to null.Mar 19 2019, 8:06 AM
alaa_wmde updated the task description. (Show Details)
alaa_wmde updated the task description. (Show Details)
alaa_wmde triaged this task as High priority.EditedMar 19 2019, 8:08 AM

Hight because the alternative is to disable Musical Notation again. The revert has already been patched https://gerrit.wikimedia.org/r/497433

I have the patch on my machine .. will push it once gerrit is back online

mb added a subscriber: mb.Mar 19 2019, 9:50 AM
alaa_wmde renamed this task from Reset default wgScoreTrim to null to Reset default wgScoreTrim to true.Mar 19 2019, 9:56 AM
alaa_wmde updated the task description. (Show Details)
alaa_wmde updated the task description. (Show Details)Mar 19 2019, 10:18 AM

@Ebe123 @Addshore I would do the second AC too, but I could be missing where else I should check that this might cause issues.

Wikidata is unaffected as they made $wgScoreTrim explicitly true for them in the settings.

I'm perplexed on why you will send a patch knowing that a similar patch is already on Gerrit.
Misunderstood.

Wikidata is unaffected as they made $wgScoreTrim explicitly true for them in the settings.
I'm perplexed on why you will send a patch knowing that a similar patch is already on Gerrit.

Well, right now we can't actually see what https://gerrit.wikimedia.org/r/497433 is ;)
We are just letting you know we are prepared and will push it / merge whatever is appropriate as soon as we can

This comment was removed by Ebe123.

Change 497475 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[operations/mediawiki-config@master] Set default wgScoreTrim to null

https://gerrit.wikimedia.org/r/497475

Change 497475 abandoned by Alaa Sarhan:
Set default wgScoreTrim to null

Reason:
Duplicate of 497433

https://gerrit.wikimedia.org/r/497475

alaa_wmde closed this task as Invalid.Mar 19 2019, 1:45 PM

Duplicate of T218535