Page MenuHomePhabricator

Review/cleanup inappropriate usages of wmg in MobileFrontend site config
Closed, ResolvedPublic

Description

in wmf-config/mobile.php we have various lines like this:

$wgMFNoMobileCategory = $wmgMFNoMobileCategory;
$wgMFNoMobilePages = $wmgMFNoMobilePages;

We often use variables starting with $wmg to trigger certain blocks of code in CommonSettings.php but I'm not sure how helpful our usages are.

It feels to me that we could probably remove all the lines in wmf-config/mobile.php in favour of wg prefixed variables in wmf-config/InitialiseSettings.php

Details

Related Gerrit Patches:
operations/mediawiki-config : masterSwitch MobileFrontend to extension registration

Event Timeline

Jdlrobson created this task.Oct 3 2016, 9:10 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 3 2016, 9:10 PM

This also appears to cause confusion when we deploy things:
https://gerrit.wikimedia.org/r/314627

So I'd suggest we fix this sooner rather than later :)

Restricted Application added subscribers: JEumerus, Matanya. · View Herald TranscriptOct 6 2016, 11:17 PM

So, a bit of MediaWiki history:

  • previously, settings were global variables first defined by the extension code, then by the configuration
  • currently, we've a system of extension registration, where the settings can be defined before to load the extension

To avoid such overwrite by the extension code, we used the wmg = wg trick.

As long as extensions use extension registration, we can instead directly use wg variables in IS.

Change 314748 had a related patch set uploaded (by Dereckson):
Switch to extension registration for Mobile extensions

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

ovasileva triaged this task as Medium priority.Oct 12 2016, 3:42 PM
ovasileva added a project: Technical-Debt.

Let's identify which Reading Web maintained extensions can benefit from this. If I'm not mistaken some extensions still use the old registration system.

Jdlrobson renamed this task from Review/cleanup usages of wmg in site config to Review/cleanup inappropriate usages of wmg in MobileFrontend site config.Nov 29 2016, 12:10 AM

Change 314748 merged by jenkins-bot:
Switch MobileFrontend to extension registration

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

bmansurov closed this task as Resolved.Nov 29 2016, 4:34 PM