Last modified: 2007-08-27 21:35:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T13072, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 11072 - Uploader information is wrong
Uploader information is wrong
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.11.x
All All
: Normal normal (vote)
: ---
Assigned To: Yuri Astrakhan
http://commons.wikimedia.org/w/api.ph...
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-26 19:13 UTC by Bryan Tong Minh
Modified: 2007-08-27 21:35 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Fix for this bug (2.52 KB, patch)
2007-08-27 19:34 UTC, Bryan Tong Minh
Details

Description Bryan Tong Minh 2007-08-26 19:13:37 UTC
http://commons.wikimedia.org/wiki/Image:Escudo_de_Toledo.svg

The API tells that the uploader of the older version of this image is anonymous, while that clearly isn't the case.
Comment 1 Brion Vibber 2007-08-27 18:42:45 UTC
Well, this is suspicious:


Notice: Undefined property: stdClass::$img_timestamp in /opt/web/pages/trunk/includes/api/ApiQueryImageInfo.php on line 73

Notice: Undefined property: stdClass::$img_user_text in /opt/web/pages/trunk/includes/api/ApiQueryImageInfo.php on line 75

Notice: Undefined property: stdClass::$img_user in /opt/web/pages/trunk/includes/api/ApiQueryImageInfo.php on line 76

Looks like it's looking at oldimage rows incorrectly.
Comment 2 Bryan Tong Minh 2007-08-27 19:34:17 UTC
Created attachment 4048 [details]
Fix for this bug

Yeah, the prefix for the first row is img_; for all others it's oi_. In includes/ImagePage.php this appears to be fixed by just duplicating code. I don't think there is another way to do so. I have attached a diff, but I think it is quite ugly.
Comment 3 Roan Kattouw 2007-08-27 21:16:02 UTC
Reassigning to Yuri, since the imageinfo module is one of the many modules that was moved from query.php, which was mainly maintained by Yuri in the first place.
Comment 4 Brion Vibber 2007-08-27 21:35:14 UTC
Fixed in r25212, with a slightly different workaround to avoid the duplicate code.

The LocalFile::nextHistoryLine() interface changed recently to return the original column names from the oldimage table instead of aliasing them to the image table column names.

That entire interface is dreadful:
* It embeds iterative state information in the image data object
* It returns raw database contents in a fairly ugly, fragile way (hence breakage when details changed)
* Ewwwwwwww :)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links