r66724 added &redirects=true for bug 22541, but when a file page on a foreign wiki is redirecting to a non-file and used via ForeignAPIRepo, the redirect target's info is fetched so there won't be $data['query']['pages'][]['imageinfo'], causing a red file link.
However, when the file is used directly on that foreign wiki, the redirect is ignored. ForeignAPIRepo should follow this behavior (ie. when a file is redirecting to a non-file, remove &redirects=true and try again).
Version: unspecified
Severity: normal