Merge "Replace deprecated wfMsg* calls with Message class calls."
[lhc/web/wiklou.git] / includes / specials / SpecialUnblock.php
index 52218ce..fb2005b 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 /**
+ * Implements Special:Unblock
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -49,23 +51,23 @@ class SpecialUnblock extends SpecialPage {
                $out->addModules( 'mediawiki.special' );
 
                $form = new HTMLForm( $this->getFields(), $this->getContext() );
-               $form->setWrapperLegend( wfMsg( 'unblockip' ) );
+               $form->setWrapperLegendMsg( 'unblockip' );
                $form->setSubmitCallback( array( __CLASS__, 'processUIUnblock' ) );
-               $form->setSubmitText( wfMsg( 'ipusubmit' ) );
-               $form->addPreText( wfMsgExt( 'unblockiptext', 'parse' ) );
+               $form->setSubmitTextMsg( 'ipusubmit' );
+               $form->addPreText( $this->msg( 'unblockiptext' )->parseAsBlock() );
 
                if( $form->show() ){
                        switch( $this->type ){
                                case Block::TYPE_USER:
                                case Block::TYPE_IP:
-                                       $out->addWikiMsg( 'unblocked',  $this->target );
+                                       $out->addWikiMsg( 'unblocked', wfEscapeWikiText( $this->target ) );
                                        break;
                                case Block::TYPE_RANGE:
-                                       $out->addWikiMsg( 'unblocked-range', $this->target );
+                                       $out->addWikiMsg( 'unblocked-range', wfEscapeWikiText( $this->target ) );
                                        break;
                                case Block::TYPE_ID:
                                case Block::TYPE_AUTO:
-                                       $out->addWikiMsg( 'unblocked-id', $this->target );
+                                       $out->addWikiMsg( 'unblocked-id', wfEscapeWikiText( $this->target ) );
                                        break;
                        }
                }
@@ -136,7 +138,7 @@ class SpecialUnblock extends SpecialPage {
 
        /**
         * Submit callback for an HTMLForm object
-        * @return \Array( Array(message key, parameters)
+        * @return Array( Array(message key, parameters)
         */
        public static function processUIUnblock( array $data, HTMLForm $form ) {
                return self::processUnblock( $data, $form->getContext() );