From: Aaron Schulz Date: Wed, 21 May 2008 21:23:04 +0000 (+0000) Subject: Cleanup for displaying old versions X-Git-Tag: 1.31.0-rc.0~47488 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=40589a98d7743ae0726de1321f0933f4aae8720f;p=lhc%2Fweb%2Fwiklou.git Cleanup for displaying old versions --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index c309d446a3..8655d9850b 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -10,8 +10,8 @@ if( !defined( 'MEDIAWIKI' ) ) */ class ImagePage extends Article { - /* private */ var $img; // Image object this page is shown for - /* private */ var $current; + /* private */ var $img; // Image object + /* private */ var $displayImg; /* private */ var $repo; /* private */ var $time; /* private */ var $fileLoaded; @@ -31,12 +31,12 @@ class ImagePage extends Article { if( $this->fileLoaded ) { return true; } - $this->img = wfFindFile( $this->mTitle, $this->time ); - if ( !$this->img ) { - $this->img = wfLocalFile( $this->mTitle ); - $this->current = $this->img; + $this->displayImg = wfFindFile( $this->mTitle, $this->time ); + if ( !$this->displayImg ) { + $this->displayImg = wfLocalFile( $this->mTitle ); + $this->img = $this->displayImg; } else { - $this->current = $this->time ? wfLocalFile( $this->mTitle ) : $this->img; + $this->img = $this->time ? wfLocalFile( $this->mTitle ) : $this->displayImg; } $this->repo = $this->img->getRepo(); $this->fileLoaded = true; @@ -595,8 +595,8 @@ EOT $this->loadFile(); if ( $this->img->exists() ) { - $list = new ImageHistoryList( $sk, $this->current, $this->img ); - $file = $this->current; + $list = new ImageHistoryList( $sk, $this->img, $this->displayImg ); + $file = $this->img; $dims = $file->getDimensionsString(); $s = $list->beginImageHistoryList(); $s .= $list->imageHistoryLine( true, $file );