Page MenuHomePhabricator

[Extension:MassEditRegex] Remove the usage of global variable $wgUser, $wgLang, $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. $wgLang with $this->getLanguage()
  3. $wgOut with $this->getOutput()

in MassEditRegex.special.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)

Details

Related Gerrit Patches:
mediawiki/extensions/MassEditRegex : masterRemoved the usage of global variable $wgUser, $wgLang, $wgOut

Event Timeline

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

Change 492450 had a related patch set uploaded (by Sumanth699; owner: Sumanth699):
[mediawiki/extensions/MassEditRegex@master] Removed the usage of global variable $wgUser, $wgLang, $wgOut

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

Change 492450 had a related patch set uploaded (by Sumanth699; owner: Sumanth699):
[mediawiki/extensions/MassEditRegex@master] Removed the usage of global variable $wgUser, $wgLang, $wgOut

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

Change 492450 merged by jenkins-bot:
[mediawiki/extensions/MassEditRegex@master] Removed the usage of global variable $wgUser, $wgLang, $wgOut

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

Jdforrester-WMF closed this task as Resolved.Apr 5 2019, 6:44 PM
Jdforrester-WMF removed a project: Patch-For-Review.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Thank you!