Remove throws from Title::getContentModel()
[lhc/web/wiklou.git] / includes / ProtectionForm.php
index f777a37..c546de7 100644 (file)
@@ -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 );