Index: branches/REL1_12/phase3/includes/api/ApiMove.php |
— | — | @@ -77,7 +77,7 @@ |
78 | 78 | $toTitle->getUserPermissionsErrors('edit', $wgUser)); |
79 | 79 | if(!empty($errors)) |
80 | 80 | // We don't care about multiple errors, just report one of them |
81 | | - $this->dieUsageMsg(current($errors)); |
| 81 | + $this->dieUsageMsg(reset($errors)); |
82 | 82 | |
83 | 83 | $dbw = wfGetDB(DB_MASTER); |
84 | 84 | $dbw->begin(); |
Index: branches/REL1_12/phase3/includes/api/ApiQueryBacklinks.php |
— | — | @@ -211,7 +211,7 @@ |
212 | 212 | } else { // This case is obsolete. Will support this for a while |
213 | 213 | if ($count !== 1) |
214 | 214 | $this->dieUsage("The {$this->getModuleName()} query requires one title to start", 'bad_title_count'); |
215 | | - $this->rootTitle = current($pageSet->getTitles()); // only one title there |
| 215 | + $this->rootTitle = reset($pageSet->getTitles()); // only one title there |
216 | 216 | $this->setWarning('Using titles parameter is obsolete for this list. Use ' . $this->encodeParamName('title') . ' instead.'); |
217 | 217 | } |
218 | 218 | } |
Index: branches/REL1_12/phase3/includes/api/ApiRollback.php |
— | — | @@ -68,7 +68,7 @@ |
69 | 69 | |
70 | 70 | if(!empty($retval)) |
71 | 71 | // We don't care about multiple errors, just report one of them |
72 | | - $this->dieUsageMsg(current($retval)); |
| 72 | + $this->dieUsageMsg(reset($retval)); |
73 | 73 | |
74 | 74 | $dbw->commit(); |
75 | 75 | $current = $target = $summary = NULL; |
Index: branches/REL1_12/phase3/includes/api/ApiDelete.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | |
74 | 74 | if(!empty($retval)) |
75 | 75 | // We don't care about multiple errors, just report one of them |
76 | | - $this->dieUsageMsg(current($retval)); |
| 76 | + $this->dieUsageMsg(reset($retval)); |
77 | 77 | |
78 | 78 | $dbw->commit(); |
79 | 79 | $r = array('title' => $titleObj->getPrefixedText(), 'reason' => $reason); |
Index: branches/REL1_12/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -157,7 +157,7 @@ |
158 | 158 | $this->validateLimit('limit', $limit, 1, $userMax, $botMax); |
159 | 159 | |
160 | 160 | // There is only one ID, use it |
161 | | - $this->addWhereFld('rev_page', current(array_keys($pageSet->getGoodTitles()))); |
| 161 | + $this->addWhereFld('rev_page', reset(array_keys($pageSet->getGoodTitles()))); |
162 | 162 | |
163 | 163 | if(!is_null($user)) { |
164 | 164 | $this->addWhereFld('rev_user_text', $user); |