Index: trunk/phase3/includes/api/ApiProtect.php |
— | — | @@ -58,7 +58,7 @@ |
59 | 59 | $errors = $titleObj->getUserPermissionsErrors('protect', $wgUser); |
60 | 60 | if($errors) |
61 | 61 | // We don't care about multiple errors, just report one of them |
62 | | - $this->dieUsageMsg(current($errors)); |
| 62 | + $this->dieUsageMsg(reset($errors)); |
63 | 63 | |
64 | 64 | $expiry = (array)$params['expiry']; |
65 | 65 | if(count($expiry) != count($params['protections'])) |
Index: trunk/phase3/includes/api/ApiRollback.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | |
69 | 69 | if($retval) |
70 | 70 | // We don't care about multiple errors, just report one of them |
71 | | - $this->dieUsageMsg(current($retval)); |
| 71 | + $this->dieUsageMsg(reset($retval)); |
72 | 72 | |
73 | 73 | $info = array( |
74 | 74 | 'title' => $titleObj->getPrefixedText(), |
Index: trunk/phase3/includes/api/ApiDelete.php |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | $retval = self::deleteFile($params['token'], $titleObj, $params['oldimage'], $reason, false); |
77 | 77 | if(count($retval)) |
78 | 78 | // We don't care about multiple errors, just report one of them |
79 | | - $this->dieUsageMsg(current($retval)); |
| 79 | + $this->dieUsageMsg(reset($retval)); |
80 | 80 | } else { |
81 | 81 | $articleObj = new Article($titleObj); |
82 | 82 | if($articleObj->isBigDeletion() && !$wgUser->isAllowed('bigdelete')) { |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | |
88 | 88 | if(count($retval)) |
89 | 89 | // We don't care about multiple errors, just report one of them |
90 | | - $this->dieUsageMsg(current($retval)); |
| 90 | + $this->dieUsageMsg(reset($retval)); |
91 | 91 | |
92 | 92 | if($params['watch'] || $wgUser->getOption('watchdeletion')) |
93 | 93 | $articleObj->doWatch(); |
Index: trunk/phase3/includes/api/ApiPatrol.php |
— | — | @@ -57,7 +57,7 @@ |
58 | 58 | $retval = RecentChange::markPatrolled($params['rcid']); |
59 | 59 | |
60 | 60 | if($retval) |
61 | | - $this->dieUsageMsg(current($retval)); |
| 61 | + $this->dieUsageMsg(reset($retval)); |
62 | 62 | |
63 | 63 | $result = array('rcid' => intval($rc->getAttribute('rc_id'))); |
64 | 64 | ApiQueryBase::addTitleInfo($result, $rc->getTitle()); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -305,6 +305,8 @@ |
306 | 306 | * (bug 17288) Messages improved for default language (English) |
307 | 307 | * (bug 12937) Update native name for Afar |
308 | 308 | * (bug 16909) 'histlegend' now reuses messages instead of copying them |
| 309 | +* (bug 17832) action=delete returns 'unknownerror' instead of 'permissiondenied' when |
| 310 | + the user is blocked |
309 | 311 | |
310 | 312 | == Compatibility == |
311 | 313 | |