Use local context instead of global variables
This commit is contained in:
parent
5e5b01dc07
commit
005c5ad216
1 changed files with 5 additions and 5 deletions
|
|
@ -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' );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue