diff options
author | Kunal Mehta <legoktm@gmail.com> | 2013-12-20 01:06:51 -0800 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2014-06-15 23:46:37 +0000 |
commit | e179b4f11b8eb194481efb72432f7bc78421aaf2 (patch) | |
tree | 21283b176d255ea599f645d4de8a14c5557ae8dd /includes/api | |
parent | e48ecbc524702768ee2c226914eef8b7a339d2e5 (diff) | |
download | mediawikicore-e179b4f11b8eb194481efb72432f7bc78421aaf2.tar.gz mediawikicore-e179b4f11b8eb194481efb72432f7bc78421aaf2.zip |
API: Allow 'infinity' as a valid protection expiry
Change-Id: If9eb1f3e835579f5c8b8be22297a1eb26beda4e7
Diffstat (limited to 'includes/api')
-rw-r--r-- | includes/api/ApiProtect.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php index ffbf01b1bf6b..b9f97e3536a4 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( |