Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -67,24 +67,26 @@ |
68 | 68 | |
69 | 69 | $isCur = true; |
70 | 70 | while($line = $img->nextHistoryLine()) { // assignment |
| 71 | + $row = get_object_vars( $line ); |
71 | 72 | $vals = array(); |
| 73 | + $prefix = $isCur ? 'img' : 'oi'; |
72 | 74 | |
73 | 75 | if ($fld_timestamp) |
74 | | - $vals['timestamp'] = wfTimestamp(TS_ISO_8601, $line->img_timestamp); |
| 76 | + $vals['timestamp'] = wfTimestamp(TS_ISO_8601, $row["${prefix}_timestamp"]); |
75 | 77 | if ($fld_user) { |
76 | | - $vals['user'] = $line->img_user_text; |
77 | | - if(!$line->img_user) |
| 78 | + $vals['user'] = $row["${prefix}_user_text"]; |
| 79 | + if(!$row["${prefix}_user"]) |
78 | 80 | $vals['anon'] = ''; |
79 | 81 | } |
80 | 82 | if ($fld_size) { |
81 | | - $vals['size'] = intval($line->img_size); |
82 | | - $vals['width'] = intval($line->img_width); |
83 | | - $vals['height'] = intval($line->img_height); |
| 83 | + $vals['size'] = intval($row["{$prefix}_size"]); |
| 84 | + $vals['width'] = intval($row["{$prefix}_width"]); |
| 85 | + $vals['height'] = intval($row["{$prefix}_height"]); |
84 | 86 | } |
85 | 87 | if ($fld_url) |
86 | | - $vals['url'] = $isCur ? $img->getURL() : $img->getArchiveUrl($line->oi_archive_name); |
| 88 | + $vals['url'] = $isCur ? $img->getURL() : $img->getArchiveUrl($row["oi_archive_name"]); |
87 | 89 | if ($fld_comment) |
88 | | - $vals['comment'] = $line->img_description; |
| 90 | + $vals['comment'] = $row["{$prefix}_description"]; |
89 | 91 | |
90 | 92 | $data[] = $vals; |
91 | 93 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -417,6 +417,7 @@ |
418 | 418 | * Preventing the TOC from appearing in Special:Statistics |
419 | 419 | * (bug 11082) Fix check for fully-specced table names in Database::tableName |
420 | 420 | * (bug 11067) Fix regression in upload conflict thumbnail display |
| 421 | +* (bug 11072) Fix regression in API image history query |
421 | 422 | |
422 | 423 | |
423 | 424 | == API changes since 1.10 == |