Page MenuHomePhabricator

Stop accessing global config variables from SecurePoll ActionPages (OT)
Closed, ResolvedPublic2 Estimated Story PointsJan 12 2021

Description

See T71084 for the motivation behind this work.

Classes that extend ActionPage can access configs using SpecialPage::getConfig.

Example from VoterEligibilityPage:

global $wgSecurePollUseNamespace;
...
if ( global $wgSecurePollUseNamespace ) {
...

can be replaced with:

if ( $this->specialPage->getConfig()->get('SecurePollUseNamespace') ) {
...

ActionPage classes that access global config variables:

  • CreatePage
  • DetailsPage
  • TranslatePage
  • VoterEligibilityPage

Details

Due Date
Jan 12 2021, 5:00 AM

Event Timeline

Niharika renamed this task from Stop accessing global config variables from SecurePoll ActionPages to Stop accessing global config variables from SecurePoll ActionPages (OT).Jan 6 2021, 7:17 AM
Niharika triaged this task as Medium priority.
ARamirez_WMF changed the subtype of this task from "Task" to "Deadline".

Change 655751 had a related patch set uploaded (by Wikitrent; owner: Wikitrent):
[mediawiki/extensions/SecurePoll@master] Remove Global Vars from ActionPages

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

Change 655751 merged by jenkins-bot:
[mediawiki/extensions/SecurePoll@master] Remove Global Vars from ActionPages

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