Index: branches/apiedit/phase3/CHANGED |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | |
22 | 22 | api/ApiQueryInfo.php |
23 | 23 | * Implemented tokens (r23562, r23568,r23638, r23668) |
24 | | -* Added lastrevby field (r23562) |
| 24 | +* Fixed bug 10898 (r24458) |
25 | 25 | |
26 | 26 | api/ApiRollback.php (NEW) |
27 | 27 | * action=rollback module that wraps around Article::doRollback() (r23562) |
Index: branches/apiedit/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -158,6 +158,17 @@ |
159 | 159 | 'pages' |
160 | 160 | ), $pageid, $pageInfo); |
161 | 161 | } |
| 162 | + |
| 163 | + // Get edit tokens for missing titles if requested |
| 164 | + // Delete, protect and move tokens are N/A for missing titles anyway |
| 165 | + if(isset($params['tokens']['edit'])) |
| 166 | + { |
| 167 | + $missing = $pageSet->getMissingTitles(); |
| 168 | + $res = $result->getData(); |
| 169 | + foreach($missing as $pageid => $title) |
| 170 | + $res['query']['pages'][$pageid]['tokens']['edit'] = $wgUser->editToken(); |
| 171 | + } |
| 172 | + |
162 | 173 | } |
163 | 174 | |
164 | 175 | protected function getAllowedParams() { |