From: Alex Z Date: Sat, 1 Nov 2008 00:00:25 +0000 (+0000) Subject: (bug 16207) - Fix title protection in the API. $expiry is cast to an array near the... X-Git-Tag: 1.31.0-rc.0~44491 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_del%27%2C%20idvote=vote.voteid%29%20%7D%7D?a=commitdiff_plain;h=1b580a65d2ba7d0b6af40efbd7f4dd30c4f4540e;p=lhc%2Fweb%2Fwiklou.git (bug 16207) - Fix title protection in the API. $expiry is cast to an array near the start and doesn't have the correct timestamp format here anyway. --- diff --git a/includes/api/ApiProtect.php b/includes/api/ApiProtect.php index f6eb32c572..ecd09ebbd5 100644 --- a/includes/api/ApiProtect.php +++ b/includes/api/ApiProtect.php @@ -109,7 +109,7 @@ class ApiProtect extends ApiBase { $articleObj = new Article($titleObj); $ok = $articleObj->updateRestrictions($protections, $params['reason'], $params['cascade'], $expiryarray); } else - $ok = $titleObj->updateTitleProtection($protections['create'], $params['reason'], $expiry); + $ok = $titleObj->updateTitleProtection($protections['create'], $params['reason'], $expiryarray['create']); if(!$ok) // This is very weird. Maybe the article was deleted or the user was blocked/desysopped in the meantime? // Just throw an unknown error in this case, as it's very likely to be a race condition