r29971 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29970‎ | r29971 | r29972 >
Date:08:18, 20 January 2008
Author:vasilievvv
Status:old
Tags:
Comment:
* Fix empty file histories
* Fix Media: links to image redirects
Modified paths:
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/includes/filerepo/LocalRepo.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -411,7 +411,7 @@
412412
413413 $sk = $wgUser->getSkin();
414414
415 - if ( $this->img ) {
 415+ if ( $this->img->exists ) {
416416 $list = new ImageHistoryList( $sk, $this->img );
417417 $file = $this->img;
418418 $dims = $file->getDimensionsString();
Index: trunk/phase3/includes/filerepo/LocalRepo.php
@@ -89,6 +89,10 @@
9090 if( !$wgFileRedirects ) {
9191 return false;
9292 }
 93+
 94+ if( $title->getNamespace() == NS_MEDIA ) {
 95+ $title = Title::makeTitle( NS_IMAGE, $title->getText() );
 96+ }
9397
9498 $id = $this->getArticleID( $title );
9599 if( !$id ) {

Status & tagging log