Page MenuHomePhabricator

[Extension:Patroller] Remove the usage of global variable $wgUser, $wgRequest, $wgOut
Closed, ResolvedPublic

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

in SpecialPatroller.php. If there are multiple usage then use variable to store context instead of calling $this again and again.

Level:- Easy

Reserved for Mini-MWT at VVIT (Feb 2019)

Event Timeline

Restricted Application added a project: User-Jayprakash12345. · View Herald TranscriptFeb 18 2019, 8:37 AM

Change 492451 had a related patch set uploaded (by Naga sai sravanth; owner: Naga sai sravanth):
[mediawiki/extensions/Patroller@master] Remove usage of global variables

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

Change 492451 had a related patch set uploaded (by D3r1ck01; owner: Naga sai sravanth):
[mediawiki/extensions/Patroller@master] Remove usage of global variables

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

Change 492451 merged by Cblair91:
[mediawiki/extensions/Patroller@master] Remove usage of global variables

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

Jayprakash12345 closed this task as Resolved.Mar 25 2019, 2:11 PM
Jayprakash12345 removed a project: Patch-For-Review.
Jayprakash12345 removed a subscriber: gerritbot.