X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSpecialBlockme.php;h=f222e3c63e3ea194894ac77f1ae3be102a641f5c;hb=def840161ffd74c421e1d60431270f51cce34dd3;hp=6721d26796eec2e3c380d56fc51b93521baacd97;hpb=ba2afcd9fa9b1f3f6a865da054068466164fd2fa;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialBlockme.php b/includes/SpecialBlockme.php index 6721d26796..f222e3c63e 100644 --- a/includes/SpecialBlockme.php +++ b/includes/SpecialBlockme.php @@ -1,25 +1,24 @@ addWikiText( wfMsg( "disabled" ) ); + if( !$wgBlockOpenProxies || $wgRequest->getText( 'ip' ) != md5( $ip . $wgProxyKey ) ) { + $wgOut->addWikiMsg( 'proxyblocker-disabled' ); return; - } + } $blockerName = wfMsg( "proxyblocker" ); $reason = wfMsg( "proxyblockreason" ); - $success = wfMsg( "proxyblocksuccess" ); $u = User::newFromName( $blockerName ); $id = $u->idForName(); @@ -31,9 +30,8 @@ function wfSpecialBlockme() $id = $u->getID(); } - $block = new Block( $wgIP, 0, $id, $reason, wfTimestampNow() ); + $block = new Block( $ip, 0, $id, $reason, wfTimestampNow() ); $block->insert(); - $wgOut->addWikiText( $success ); + $wgOut->addWikiMsg( "proxyblocksuccess" ); } -?>