r80770 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80769‎ | r80770 | r80771 >
Date:21:09, 22 January 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Fixup deprecated method call fixme on r69995
Modified paths:
  • /trunk/extensions/OAI/OAIRepo_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OAI/OAIRepo_body.php
@@ -877,7 +877,7 @@
878878 array( 'img_name' => $this->_row->page_title ),
879879 $fname );
880880 if( $imageRow ) {
881 - $url = Image::imageUrl( $imageRow->img_name );
 881+ $url = wfFindFile( $imageRow->img_name )->getUrl();
882882
883883 if( $url{0} == '/' ) {
884884 global $wgServer;

Follow-up revisions

RevisionCommit summaryAuthorDate
r810791.17: MFT r80507, r80634, r80770, r80961, r80978, r80985, r81042, r81060, r81...catrope01:15, 27 January 2011
r95169Bug 26304 - OAIRepository fatal error stops search indexing...reedy18:39, 21 August 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r69995Drop OAI repository check for newSchema...reedy10:18, 27 July 2010

Comments

#Comment by Brion VIBBER (talk | contribs)   21:43, 16 August 2011

This line is triggering a fatal error in production, found via latest comments on bug 26304

#Comment by Reedy (talk | contribs)   16:39, 18 August 2011

Would just doing the following be enough? I'm going based on the fact it will do return , if !$imageRow it returns

			$file = wfFindFile( $imageRow->img_name );
			if ( !$file ) {
				return '';
			}
			$url = $file->getUrl();

Maybe with a debug statement in there for interest...

Status & tagging log