X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FProtectionForm.php;h=1219da51d1f8626f23f6930c40a81998117b2b5d;hb=d3efb28185e84383ee21f77871f592fbe72f4846;hp=4eae1ce42877e6f45e757ea94c2bd3ee1e87c938;hpb=2f17fff894db12596e186b6bec018fe25311ae48;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 4eae1ce428..1219da51d1 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -156,7 +156,7 @@ class ProtectionForm { } else { $value = $this->mExpirySelection[$action]; } - if ( $value == 'infinite' || $value == 'indefinite' || $value == 'infinity' ) { + if ( wfIsInfinity( $value ) ) { $time = wfGetDB( DB_SLAVE )->getInfinity(); } 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"; }