Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -134,6 +134,16 @@ |
135 | 135 | 'pages' |
136 | 136 | ), $pageid, $pageInfo); |
137 | 137 | } |
| 138 | + |
| 139 | + // Get edit tokens for missing titles if requested |
| 140 | + // Delete, protect and move tokens are N/A for missing titles anyway |
| 141 | + if($tok_edit) |
| 142 | + { |
| 143 | + $missing = $pageSet->getMissingTitles(); |
| 144 | + $res = $result->getData(); |
| 145 | + foreach($missing as $pageid => $title) |
| 146 | + $res['query']['pages'][$pageid]['edittoken'] = $wgUser->editToken(); |
| 147 | + } |
138 | 148 | } |
139 | 149 | |
140 | 150 | protected function getAllowedParams() { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -496,6 +496,7 @@ |
497 | 497 | * Added meta=userinfo - logged-in user information, group membership, rights |
498 | 498 | * (bug 11072) Fix regression in API image history query |
499 | 499 | * (bug 11115) Adding SHA1 hash to imageinfo query |
| 500 | +* (bug 10898) API does not return an edit token for non-existent pages |
500 | 501 | |
501 | 502 | == Maintenance script changes since 1.10 == |
502 | 503 | |