X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FProtectionForm.php;h=c546de75f39ad388c49b2a91d8769a154191d229;hb=0eeed48cc9d7dfd440a469d980a2738b36a13493;hp=f777a37df40ab40581adb1adb5a2978e30a53bd6;hpb=f4344a2f67230b8cc3e4070371f9deb43358ef05;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index f777a37df4..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 );