Add time parameter here
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 3 Feb 2008 07:23:25 +0000 (07:23 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 3 Feb 2008 07:23:25 +0000 (07:23 +0000)
includes/GlobalFunctions.php
includes/ImagePage.php

index 3b19ae4..ccf7f84 100644 (file)
@@ -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 );
 }
 
 /**
index 198d510..02cfc66 100644 (file)
@@ -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;
        }