MediaWiki r66724 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r66723‎ | r66724 (on ViewVC)‎ | r66725 >
Date:15:59, 21 May 2010
Author:hartman
Status:resolved (Comments)
Tags:
Comment:
Bug 22541. Support image redirects on Commons for ForeignAPIRepo

getImageInfo() now requires fetchImageQuery() results as input.
Modified paths:

Diff [purge]

Loading diff…

Follow-up revisions

Rev.Commit summaryAuthorDate
r79708Fixup minor FIXME on r66724reedy03:21, 6 January 2011

Comments

#Comment by Catrope (talk | contribs)   22:18, 14 December 2010
+		$info = $repo->getImageInfo( $data );
+
+		if( $data && $info) {

There's no need to check $data, as getImageInfo() will already have done that.

+				$newtitle = Title::newFromText( $data['query']['redirects'][0]['to']);

If you want proper resolution of redirect chains (double, triple, ... redirects) you should use the last element of $data['query']['redirects'], not the first one.

OK otherwise.

#Comment by TheDJ (talk | contribs)   07:19, 6 January 2011

hmm, thx Reedy. Totally forgot about this one. We reallly need a "my fixmes" filter in Code Review.

#Comment by Shifuimam (talk | contribs)   21:22, 25 January 2013

Per bug 42610, this patch broke the ability to embed images from foreign file repos that redirect to non-image locations on the remote wiki. I can provide examples if necessary - please feel free to contact me through my talk page.

Status & tagging log

  • 03:21, 6 January 2011 Reedy (talk | contribs) changed the status of r66724 [removed: fixme added: resolved]
  • 22:18, 14 December 2010 Catrope (talk | contribs) changed the status of r66724 [removed: new added: fixme]