From e179b4f11b8eb194481efb72432f7bc78421aaf2 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Fri, 20 Dec 2013 01:06:51 -0800 Subject: [PATCH] API: Allow 'infinity' as a valid protection expiry Change-Id: If9eb1f3e835579f5c8b8be22297a1eb26beda4e7 --- includes/api/ApiProtect.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php index ffbf01b1bf..b9f97e3536 100644 --- a/includes/api/ApiProtect.php +++ b/includes/api/ApiProtect.php @@ -77,7 +77,7 @@ class ApiProtect extends ApiBase { $this->dieUsageMsg( array( 'protect-invalidlevel', $p[1] ) ); } - if ( in_array( $expiry[$i], array( 'infinite', 'indefinite', 'never' ) ) ) { + if ( in_array( $expiry[$i], array( 'infinite', 'indefinite', 'infinity', 'never' ) ) ) { $expiryarray[$p[0]] = $db->getInfinity(); } else { $exp = strtotime( $expiry[$i] ); @@ -187,7 +187,7 @@ class ApiProtect extends ApiBase { 'expiry' => array( 'Expiry timestamps. If only one timestamp is ' . 'set, it\'ll be used for all protections.', - 'Use \'infinite\', \'indefinite\' or \'never\', for a never-expiring protection.' + 'Use \'infinite\', \'indefinite\', \'infinity\' or \'never\', for a never-expiring protection.' ), 'reason' => 'Reason for (un)protecting', 'cascade' => array( -- 2.20.1