X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialBlock.php;h=b4d4220ddfb9eca7e4fa47c5b5d2169bf95f7a98;hb=3f222188ee5e42816d865e4902109d3d24df61d4;hp=c237401345737a7150f003365f0353faa53c6d3f;hpb=badc035712ded02e8ec7ee4c5e8a0fe09e2811d2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php index c237401345..b4d4220ddf 100644 --- a/includes/specials/SpecialBlock.php +++ b/includes/specials/SpecialBlock.php @@ -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 );