r48123 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48122‎ | r48123 | r48124 >
Date:13:02, 7 March 2009
Author:catrope
Status:resolved (Comments)
Tags:
Comment:
Backporting r48122 to 1.14 branch
Modified paths:
  • /branches/REL1_14/phase3/includes/api/ApiDelete.php (modified) (history)
  • /branches/REL1_14/phase3/includes/api/ApiPatrol.php (modified) (history)
  • /branches/REL1_14/phase3/includes/api/ApiProtect.php (modified) (history)
  • /branches/REL1_14/phase3/includes/api/ApiRollback.php (modified) (history)

Diff [purge]

Index: branches/REL1_14/phase3/includes/api/ApiProtect.php
@@ -59,7 +59,7 @@
6060 $errors = $titleObj->getUserPermissionsErrors('protect', $wgUser);
6161 if($errors)
6262 // We don't care about multiple errors, just report one of them
63 - $this->dieUsageMsg(current($errors));
 63+ $this->dieUsageMsg(reset($errors));
6464
6565 $expiry = (array)$params['expiry'];
6666 if(count($expiry) != count($params['protections']))
Index: branches/REL1_14/phase3/includes/api/ApiRollback.php
@@ -68,7 +68,7 @@
6969
7070 if($retval)
7171 // We don't care about multiple errors, just report one of them
72 - $this->dieUsageMsg(current($retval));
 72+ $this->dieUsageMsg(reset($retval));
7373
7474 $info = array(
7575 'title' => $titleObj->getPrefixedText(),
Index: branches/REL1_14/phase3/includes/api/ApiDelete.php
@@ -76,14 +76,14 @@
7777 $retval = self::deleteFile($params['token'], $titleObj, $params['oldimage'], $reason, false);
7878 if(count($retval))
7979 // We don't care about multiple errors, just report one of them
80 - $this->dieUsageMsg(current($retval));
 80+ $this->dieUsageMsg(reset($retval));
8181 } else {
8282 $articleObj = new Article($titleObj);
8383 $retval = self::delete($articleObj, $params['token'], $reason);
8484
8585 if(count($retval))
8686 // We don't care about multiple errors, just report one of them
87 - $this->dieUsageMsg(current($retval));
 87+ $this->dieUsageMsg(reset($retval));
8888
8989 if($params['watch'] || $wgUser->getOption('watchdeletion'))
9090 $articleObj->doWatch();
Index: branches/REL1_14/phase3/includes/api/ApiPatrol.php
@@ -58,7 +58,7 @@
5959 $retval = RecentChange::markPatrolled($params['rcid']);
6060
6161 if($retval)
62 - $this->dieUsageMsg(current($retval));
 62+ $this->dieUsageMsg(reset($retval));
6363
6464 $result = array('rcid' => $rc->getAttribute('rc_id'));
6565 ApiQueryBase::addTitleInfo($result, $rc->getTitle());

Follow-up revisions

RevisionCommit summaryAuthorDate
r53178* Updates for release of 1.14.0...tstarling16:25, 13 July 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r48122* API: (bug 17832) action=delete returns 'unknownerror' instead of 'permissio...catrope12:58, 7 March 2009

Comments

#Comment by Tim Starling (talk | contribs)   16:04, 13 July 2009

Missing release notes.

Status & tagging log