r22567 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22566‎ | r22567 | r22568 >
Date:15:39, 30 May 2007
Author:tstarling
Status:old
Tags:
Comment:
Backwards compatibility for Image::newFromTitle()
Modified paths:
  • /branches/filerepo-work/phase3/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: branches/filerepo-work/phase3/includes/filerepo/LocalFile.php
@@ -1306,6 +1306,14 @@
13071307 $repo = FileRepoGroup::singleton()->getLocalRepo();
13081308 parent::__construct( $title, $repo );
13091309 }
 1310+
 1311+ function newFromTitle( $title, $time = false ) {
 1312+ $img = wfFindFile( $title, $time );
 1313+ if ( !$img ) {
 1314+ $img = wfLocalFile( $time );
 1315+ }
 1316+ return $img;
 1317+ }
13101318 }
13111319
13121320 /**