Merge "Switch some HTMLForms in special pages to OOUI"
[lhc/web/wiklou.git] / includes / specials / SpecialBlock.php
index c237401..b4d4220 100644 (file)
@@ -103,7 +103,7 @@ class SpecialBlock extends FormSpecialPage {
                $msg = $this->alreadyBlocked ? 'ipb-change-block' : 'ipbsubmit';
                $form->setSubmitTextMsg( $msg );
 
-               $this->getOutput()->addHelpLink( 'Help:Blocking users' );
+               $this->addHelpLink( 'Help:Blocking users' );
 
                # Don't need to do anything if the form has been posted
                if ( !$this->getRequest()->wasPosted() && $this->preErrors ) {
@@ -394,8 +394,8 @@ class SpecialBlock extends FormSpecialPage {
 
                # Link to edit the block dropdown reasons, if applicable
                if ( $user->isAllowed( 'editinterface' ) ) {
-                       $links[] = Linker::link(
-                               Title::makeTitle( NS_MEDIAWIKI, 'Ipbreason-dropdown' ),
+                       $links[] = Linker::linkKnown(
+                               $this->msg( 'ipbreason-dropdown' )->inContentLanguage()->getTitle(),
                                $this->msg( 'ipb-edit-dropdown' )->escaped(),
                                array(),
                                array( 'action' => 'edit' )
@@ -848,16 +848,11 @@ class SpecialBlock extends FormSpecialPage {
         * Convert a submitted expiry time, which may be relative ("2 weeks", etc) or absolute
         * ("24 May 2034", etc), into an absolute timestamp we can put into the database.
         * @param string $expiry Whatever was typed into the form
-        * @return string Timestamp or "infinity" string for the DB implementation
+        * @return string Timestamp or 'infinity'
         */
        public static function parseExpiryInput( $expiry ) {
-               static $infinity;
-               if ( $infinity == null ) {
-                       $infinity = wfGetDB( DB_SLAVE )->getInfinity();
-               }
-
                if ( wfIsInfinity( $expiry ) ) {
-                       $expiry = $infinity;
+                       $expiry = 'infinity';
                } else {
                        $expiry = strtotime( $expiry );