Page MenuHomePhabricator

[Extension:Duplicator] Remove the usage of global variable $wgUser, $wgRequest, $wgOut, $wgLang
Open, Needs TriagePublic

Description

Problem

Now we are replacing the global variable by getting the context. The Classes which extends SpecialPage can directly access the context by $this.

Solution

Replace

  1. $wgUser with $this->getUser()
  2. $wgRequest with $this->getRequest()
  3. $wgOut with $this->getOutput()
  4. $wgLang with $this->getLanguage()

in Duplicator.page.php. If there are multiple usages then use a variable to store context instead of calling $this again and again.

Level

Easy

Reserved for Mini-MWT at VVIT (Feb 2019)

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a project: User-Jayprakash12345. · View Herald TranscriptFeb 18 2019, 10:16 AM
MNavya claimed this task.Feb 23 2019, 5:42 AM

Change 492446 had a related patch set uploaded (by MNavya; owner: MNavya):
[mediawiki/extensions/Duplicator@master] added Remove the usage of global variable $wgUser, $wgRequest, $wgOut, $wgLang

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