Use existing CSS classes for label and input elements in table for proper aligning
[lhc/web/wiklou.git] / includes / SpecialBlockme.php
index fd547bb..6c9dea0 100644 (file)
@@ -1,16 +1,24 @@
 <?php
-function wfSpecialBlockme()
-{
-       global $wgIP, $wgBlockOpenProxies, $wgOut, $wgProxyKey;
+/**
+ *
+ * @addtogroup SpecialPage
+ */
 
-       if ( !$wgBlockOpenProxies || $_REQUEST['ip'] != md5( $wgIP . $wgProxyKey ) ) {
-               $wgOut->addWikiText( wfMsg( "disabled" ) );
+/**
+ *
+ */
+function wfSpecialBlockme() {
+       global $wgRequest, $wgBlockOpenProxies, $wgOut, $wgProxyKey;
+
+       $ip = wfGetIP();
+       
+       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();
@@ -22,9 +30,9 @@ 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" );
 }
-?>
+