Move image-specific methods to Image-class
[lhc/web/wiklou.git] / includes / SpecialBlockme.php
index 1ea9f8b..fd547bb 100644 (file)
@@ -1,17 +1,17 @@
 <?php
 function wfSpecialBlockme()
 {
-       global $wgIP, $wgBlockOpenProxies, $wgOut;
+       global $wgIP, $wgBlockOpenProxies, $wgOut, $wgProxyKey;
 
-       if ( !$wgBlockOpenProxies ) {
+       if ( !$wgBlockOpenProxies || $_REQUEST['ip'] != md5( $wgIP . $wgProxyKey ) ) {
                $wgOut->addWikiText( wfMsg( "disabled" ) );
                return;
-       }
+       }       
 
        $blockerName = wfMsg( "proxyblocker" );
        $reason = wfMsg( "proxyblockreason" );
        $success = wfMsg( "proxyblocksuccess" );
-       
+
        $u = User::newFromName( $blockerName );
        $id = $u->idForName();
        if ( !$id ) {