From 3b34a1ce151dda2f122353ca324b78cea080745a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 3 Feb 2008 07:23:25 +0000 Subject: [PATCH] Add time parameter here --- includes/GlobalFunctions.php | 4 ++-- includes/ImagePage.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 3b19ae4442..ccf7f84dba 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2280,8 +2280,8 @@ function wfFindFile( $title, $time = false ) { * Get an object referring to a locally registered file. * Returns a valid placeholder object if the file does not exist. */ -function wfLocalFile( $title ) { - return RepoGroup::singleton()->getLocalRepo()->newFile( $title ); +function wfLocalFile( $title, $time = false ) { + return RepoGroup::singleton()->getLocalRepo()->findFile( $title, $time ); } /** diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 198d510c90..02cfc665e9 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -19,11 +19,11 @@ class ImagePage extends Article { /* private */ var $repo; var $mExtraDescription = false; - function __construct( $title ) { + function __construct( $title, $time = false ) { parent::__construct( $title ); - $this->img = wfFindFile( $this->mTitle ); + $this->img = wfFindFile( $this->mTitle, $time ); if ( !$this->img ) { - $this->img = wfLocalFile( $this->mTitle ); + $this->img = wfLocalFile( $this->mTitle, $time ); } $this->repo = $this->img->repo; } -- 2.20.1