From: Aaron Schulz Date: Sun, 3 Feb 2008 08:43:58 +0000 (+0000) Subject: History should still look right when focusing on an old revision X-Git-Tag: 1.31.0-rc.0~49647 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%29%20.%20%22?a=commitdiff_plain;h=7a5272c5d51111d1775f3648cfb26a358416f087;p=lhc%2Fweb%2Fwiklou.git History should still look right when focusing on an old revision --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 84beb565e0..e73730bb1e 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -24,6 +24,9 @@ class ImagePage extends Article { $this->img = wfFindFile( $this->mTitle, $time ); if ( !$this->img ) { $this->img = wfLocalFile( $this->mTitle ); + $this->current = $this->img; + } else { + $this->current = $time ? wfLocalFile( $this->mTitle ) : $this->img; } $this->repo = $this->img->repo; } @@ -412,8 +415,8 @@ EOT $sk = $wgUser->getSkin(); if ( $this->img->exists() ) { - $list = new ImageHistoryList( $sk, $this->img ); - $file = $this->img; + $list = new ImageHistoryList( $sk, $this->current ); + $file = $this->current; $dims = $file->getDimensionsString(); $s = $list->beginImageHistoryList() . $list->imageHistoryLine( true, wfTimestamp(TS_MW, $file->getTimestamp()),