This fixes r56837: now redirects are only skipped if the redirects query
parameter is not set. This was presumably the intent of that commit, see
https://www.mediawiki.org/wiki/Special:Code/MediaWiki/56837#code-comments
Change-Id: I27485bba9fe196211baeeb84238e4a397c620a1d
* (bug 27202) Add timestamp sort to list=allimages.
* (bug 43137) Don't return the sha1 of revisions through the API if the content is
revision-deleted
+* ApiQueryImageInfo now also returns imageinfo for redirects.
=== Languages updated in 1.21 ===
} else {
$images = RepoGroup::singleton()->findFiles( $titles );
}
+ $resolveRedirects = $this->getPageSet()->isResolvingRedirects();
foreach ( $images as $img ) {
// Skip redirects
- if ( $img->getOriginalTitle()->isRedirect() ) {
+ if ( $img->getOriginalTitle()->isRedirect() && !$resolveRedirects ) {
continue;
}
$start = $skip ? $fromTimestamp : $params['start'];
- $pageId = $pageIds[NS_FILE][ $img->getOriginalTitle()->getDBkey() ];
+ $pageId = $pageIds[NS_FILE][ $img->getTitle()->getDBkey() ];
$fit = $result->addValue(
array( 'query', 'pages', intval( $pageId ) ),