* (bug 17288) Messages improved for default language (English)
* (bug 12937) Update native name for Afar
* (bug 16909) 'histlegend' now reuses messages instead of copying them
+* (bug 17832) action=delete returns 'unknownerror' instead of 'permissiondenied' when
+ the user is blocked
== Compatibility ==
$retval = self::deleteFile($params['token'], $titleObj, $params['oldimage'], $reason, false);
if(count($retval))
// We don't care about multiple errors, just report one of them
- $this->dieUsageMsg(current($retval));
+ $this->dieUsageMsg(reset($retval));
} else {
$articleObj = new Article($titleObj);
if($articleObj->isBigDeletion() && !$wgUser->isAllowed('bigdelete')) {
if(count($retval))
// We don't care about multiple errors, just report one of them
- $this->dieUsageMsg(current($retval));
+ $this->dieUsageMsg(reset($retval));
if($params['watch'] || $wgUser->getOption('watchdeletion'))
$articleObj->doWatch();
$retval = RecentChange::markPatrolled($params['rcid']);
if($retval)
- $this->dieUsageMsg(current($retval));
+ $this->dieUsageMsg(reset($retval));
$result = array('rcid' => intval($rc->getAttribute('rc_id')));
ApiQueryBase::addTitleInfo($result, $rc->getTitle());
$errors = $titleObj->getUserPermissionsErrors('protect', $wgUser);
if($errors)
// We don't care about multiple errors, just report one of them
- $this->dieUsageMsg(current($errors));
+ $this->dieUsageMsg(reset($errors));
$expiry = (array)$params['expiry'];
if(count($expiry) != count($params['protections']))
if($retval)
// We don't care about multiple errors, just report one of them
- $this->dieUsageMsg(current($retval));
+ $this->dieUsageMsg(reset($retval));
$info = array(
'title' => $titleObj->getPrefixedText(),