Index: trunk/phase3/includes/api/ApiQueryBacklinks.php |
— | — | @@ -229,7 +229,7 @@ |
230 | 230 | $resultData = array(); |
231 | 231 | foreach($this->data as $ns => $a) |
232 | 232 | foreach($a as $title => $arr) |
233 | | - $resultData[$arr['pageid']] = $arr; |
| 233 | + $resultData[] = $arr; |
234 | 234 | $result = $this->getResult(); |
235 | 235 | $result->setIndexedTagName($resultData, $this->bl_code); |
236 | 236 | $result->addValue('query', $this->getModuleName(), $resultData); |
Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -326,7 +326,12 @@ |
327 | 327 | public function titleToKey($title) { |
328 | 328 | $t = Title::newFromText($title); |
329 | 329 | if(!$t) |
| 330 | + { |
| 331 | + # Don't throw an error if we got an empty string |
| 332 | + if($title == '') |
| 333 | + return ''; |
330 | 334 | $this->dieUsageMsg(array('invalidtitle', $title)); |
| 335 | + } |
331 | 336 | return $t->getDbKey(); |
332 | 337 | } |
333 | 338 | |
— | — | @@ -339,7 +344,12 @@ |
340 | 345 | $t = Title::newFromDbKey($key); |
341 | 346 | # This really shouldn't happen but we gotta check anyway |
342 | 347 | if(!$t) |
| 348 | + { |
| 349 | + # Don't throw an error if we got an empty string |
| 350 | + if($key == '') |
| 351 | + return ''; |
343 | 352 | $this->dieUsageMsg(array('invalidtitle', $key)); |
| 353 | + } |
344 | 354 | return $t->getPrefixedText(); |
345 | 355 | } |
346 | 356 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -160,6 +160,9 @@ |
161 | 161 | non-hidden categories |
162 | 162 | * (bug 15228) Combining revids= and redirects now throws a warning instead of an |
163 | 163 | error, and still resolves redirects generated by the generator. |
| 164 | +* list={backlinks,embeddedin,imageusage} now return arrays with keys 0, 1, 2, |
| 165 | + etc. (AKA lists) instead of arrays with pageIDs as keys (AKA hash tables) |
| 166 | + for consistency with other list modules. |
164 | 167 | |
165 | 168 | === Languages updated in 1.14 === |
166 | 169 | |