Page MenuHomePhabricator

Stop accessing global config variables from SecurePoll maintenance scripts
Closed, ResolvedPublic

Description

See T71084 for the motivation behind this work.

Classes that extend Maintenance can access configs using Maintenance::getConfig rather than accessing the global config variables.

Example from DumpGlobalVoterList:

global $wgLocalDatabases;
$wikis = $wgLocalDatabases;

can be replaced with:

$wikis = $this->getConfig()->get( 'LocalDatabases' );

Variables that should be replaced:

Classglobal variable name
PurgePrivateVoteData$wgSecurePollKeepPrivateInfoDays
DumpGlobalVoterList$wgLocalDatabases

Event Timeline

Change 654314 had a related patch set uploaded (by STran; owner: STran):
[mediawiki/extensions/SecurePoll@master] Prefer Maintenance::getConfig over global variables

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

Change 654314 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Prefer Maintenance::getConfig over global variables

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