Page MenuHomePhabricator

Set a per-wiki flag for Hovercards to tell whether that wiki uses beta or not
Closed, ResolvedPublic

Description

From @Tgr's email

To set up a per-wiki flag, you need to add a confiuguration variable to the extension, then edit wmf-config/InitialiseSettings.php and wmf-config/CommonSettings.php in operations/mediawiki-config - set the wiki list in InitialiseSettings and use it to set the config var in CommonSettings.php. wikitech:Configuration_files has details. The heavyweight way for this is to add a new dblist (MediaViewer example), then you only need to edit it afterwards; or you can just use an ad hoc list.
In the extension, if the flag is set to beta, register the beta features hook and use BetaFeatures::isFeatureEnabled to determine whether the extension should activate; if the flag is set to non-beta, register a preference hook instead and use that preference. MediaViewer patch (note that using 'betafeatures' for the section in wgExtensionCredits was not a good idea in that patch).

Event Timeline

Prtksxna raised the priority of this task from to Medium.
Prtksxna updated the task description. (Show Details)
Prtksxna added a project: Page-Previews.
Prtksxna added subscribers: Ricordisamoa, leila, greg and 7 others.

Change 197034 had a related patch set uploaded (by Werdna):
Allow Popups to be switched between the following modes:

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

Change 197034 merged by jenkins-bot:
Act as a beta feature if so configured

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

Change 204686 had a related patch set uploaded (by Ori.livneh):
Act as a beta feature if so configured

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

Change 204687 had a related patch set uploaded (by Ori.livneh):
Act as a beta feature if so configured

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

Change 204686 merged by jenkins-bot:
Act as a beta feature if so configured

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

Change 204687 merged by jenkins-bot:
Act as a beta feature if so configured

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

Jdlrobson claimed this task.
Jdlrobson subscribed.

Looks fixed to me.