X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FProtectionForm.php;h=1443d1ca69d1a315b1aeae9d28958d30c4ff0be2;hb=dae916558f37103317e1bd31b9ee7d3ca6299826;hp=f777a37df40ab40581adb1adb5a2978e30a53bd6;hpb=0148d5b427afeae267bd69723b780e244fd34c4b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index f777a37df4..1443d1ca69 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -156,8 +156,8 @@ class ProtectionForm { } else { $value = $this->mExpirySelection[$action]; } - if ( $value == 'infinite' || $value == 'indefinite' || $value == 'infinity' ) { - $time = wfGetDB( DB_SLAVE )->getInfinity(); + if ( wfIsInfinity( $value ) ) { + $time = 'infinity'; } else { $unix = strtotime( $value ); @@ -541,9 +541,8 @@ class ProtectionForm { $out .= Xml::closeElement( 'fieldset' ); if ( $user->isAllowed( 'editinterface' ) ) { - $title = Title::makeTitle( NS_MEDIAWIKI, 'Protect-dropdown' ); - $link = Linker::link( - $title, + $link = Linker::linkKnown( + $context->msg( 'protect-dropdown' )->inContentLanguage()->getTitle(), $context->msg( 'protect-edit-reasonlist' )->escaped(), array(), array( 'action' => 'edit' )