r72621 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r72620‎ | r72621 | r72622 >
Date:00:46, 9 September 2010
Author:demon
Status:ok
Tags:
Comment:
Kill last usages of Image class, has been deprecated forever
Modified paths:
  • /trunk/extensions/SpecialFileList/SpecialFilelist.php (modified) (history)
  • /trunk/extensions/WebStore/inplace-scaler.php (modified) (history)
  • /trunk/extensions/WebStore/metadata.php (modified) (history)
  • /trunk/extensions/WebStore/store.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SpecialFileList/SpecialFilelist.php
@@ -223,7 +223,7 @@
224224 $ul = $this->sk->makeLinkObj( Title::makeTitle( NS_USER, $ut ), $ut );
225225 }
226226
227 - $ilink = "<a href=\"" . htmlspecialchars( Image::imageUrl( $name ) ) .
 227+ $ilink = "<a href=\"" . htmlspecialchars( wfLocalFile( $name )->getUrl() ) .
228228 "\">" . strtr(htmlspecialchars( $name ), '_', ' ') . "</a>";
229229
230230 $nb = wfMsg( "nbytes", $wgLang->formatNum( $s->img_size ) );
Index: trunk/extensions/WebStore/store.php
@@ -46,7 +46,7 @@
4747 $name = $wgRequest->getFileName( 'file' );
4848 $n = strrpos( $name, '.' );
4949 if ( $n ) {
50 - $extension = '.' . Image::normalizeExtension( substr( $name, $n + 1 ) );
 50+ $extension = '.' . File::normalizeExtension( substr( $name, $n + 1 ) );
5151 } else {
5252 $extension = '';
5353 }
Index: trunk/extensions/WebStore/metadata.php
@@ -48,7 +48,7 @@
4949
5050 $name = basename( $fullPath );
5151 $i = strrpos( $name, '.' );
52 - $ext = Image::normalizeExtension( $i ? substr( $name, $i + 1 ) : '' );
 52+ $ext = File::normalizeExtension( $i ? substr( $name, $i + 1 ) : '' );
5353 $magic = MimeMagic::singleton();
5454 $mime = $magic->guessTypesForExtension( $ext );
5555 $type = $magic->getMediaType( $fullPath, $mime);
Index: trunk/extensions/WebStore/inplace-scaler.php
@@ -64,7 +64,7 @@
6565 }
6666
6767 $i = strrpos( $name, '.' );
68 - $ext = Image::normalizeExtension( $i ? substr( $name, $i + 1 ) : '' );
 68+ $ext = File::normalizeExtension( $i ? substr( $name, $i + 1 ) : '' );
6969
7070 $magic = MimeMagic::singleton();
7171 $mime = $magic->guessTypesForExtension( $ext );

Status & tagging log