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

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

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 :)

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