From: Alexandre Emsenhuber Date: Sat, 3 Sep 2011 20:51:17 +0000 (+0000) Subject: Use local context instead of global variables X-Git-Tag: 1.31.0-rc.0~27930 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=005c5ad21623653a9513f63ffa8673eb6938c2be;p=lhc%2Fweb%2Fwiklou.git Use local context instead of global variables --- diff --git a/includes/specials/SpecialBlockme.php b/includes/specials/SpecialBlockme.php index 66be933175..95f92f494a 100644 --- a/includes/specials/SpecialBlockme.php +++ b/includes/specials/SpecialBlockme.php @@ -33,14 +33,14 @@ class SpecialBlockme extends UnlistedSpecialPage { } function execute( $par ) { - global $wgRequest, $wgOut, $wgBlockOpenProxies, $wgProxyKey; + global $wgBlockOpenProxies, $wgProxyKey; $this->setHeaders(); $this->outputHeader(); - $ip = $wgRequest->getIP(); - if( !$wgBlockOpenProxies || $wgRequest->getText( 'ip' ) != md5( $ip . $wgProxyKey ) ) { - $wgOut->addWikiMsg( 'proxyblocker-disabled' ); + $ip = $this->getRequest()->getIP(); + if( !$wgBlockOpenProxies || $this->getRequest()->getText( 'ip' ) != md5( $ip . $wgProxyKey ) ) { + $this->getOutput()->addWikiMsg( 'proxyblocker-disabled' ); return; } @@ -56,6 +56,6 @@ class SpecialBlockme extends UnlistedSpecialPage { $block->insert(); - $wgOut->addWikiMsg( 'proxyblocksuccess' ); + $this->getOutput()->addWikiMsg( 'proxyblocksuccess' ); } }