Fixed bug#25784 (thumbnails of stashed files had wrong description URLs).
authorNeil Kandalgaonkar <neilk@users.mediawiki.org>
Tue, 16 Nov 2010 06:57:46 +0000 (06:57 +0000)
committerNeil Kandalgaonkar <neilk@users.mediawiki.org>
Tue, 16 Nov 2010 06:57:46 +0000 (06:57 +0000)
commit59339ca7238785e6d5007a484c0bd274204b7d36
tree55f661f819218e58924d5c01c21a1b1eebe8f78c
parent678ee35b5a702c279bf23cf607108b4d200cf2e8
Fixed bug#25784 (thumbnails of stashed files had wrong description URLs).

This fixes the more general problem that the imageinfo returned with stashed uploads was inaccurate, since it was relying on
code that only worked with non-stashed files.

So, I had to:
- move the ApiQueryStashImageInfo module into core. Which others had asked for anyway, and was anticipated sometime later.
  - add lines to AutoLoader and ApiQuery to accomodate the new module

- add an ugly if/then to UploadBase -- based on the type of uploaded file, it will use a different API module to simulate a getImageInfo call.
  I left a TODO that this situation wasn't ideal, but the way things are now, imageInfo is constructed by the API modules, when it should probably
  really be the File modules. Then the API can wrap that info into various formats.

- add a few new lines to the tests to check imageinfo information in both regular and stashed upload files
includes/AutoLoader.php
includes/api/ApiQuery.php
includes/api/ApiQueryStashImageInfo.php [new file with mode: 0644]
includes/upload/UploadBase.php
maintenance/tests/phpunit/includes/api/ApiUploadTest.php