X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FProtectionForm.php;h=c546de75f39ad388c49b2a91d8769a154191d229;hb=0eeed48cc9d7dfd440a469d980a2738b36a13493;hp=4eae1ce42877e6f45e757ea94c2bd3ee1e87c938;hpb=f3ef594651b66965e2ab78d8083518710c8e7a86;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 4eae1ce428..c546de75f3 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 ); @@ -412,11 +412,9 @@ class ProtectionForm { } else { list( $show, $value ) = explode( ":", $option ); } - $show = htmlspecialchars( $show ); - $value = htmlspecialchars( $value ); $expiryFormOptions .= Xml::option( $show, - $value, + htmlspecialchars( $value ), $this->mExpirySelection[$action] === $value ) . "\n"; }