* Maintenance scripts get a --memory-limit option to override defaults (which
is usually to set it to -1 to disable the limit)
* (bug 25397) Allow uploading (not displaying) of WebP images, disabled by default
+* (bug 23194) Special:ListFiles now has thumbnails
=== Bug fixes in 1.17 ===
* (bug 17560) Half-broken deletion moved image files to deletion archive
if ( !$this->mFieldNames ) {
global $wgMiserMode;
$this->mFieldNames = array(
+ 'thumb' => wfMsg( 'listfiles_thumb' ),
'img_timestamp' => wfMsg( 'listfiles_date' ),
'img_name' => wfMsg( 'listfiles_name' ),
'img_user_text' => wfMsg( 'listfiles_user' ),
$tables = array( 'image' );
$fields = array_keys( $this->getFieldNames() );
$fields[] = 'img_user';
+ $fields[array_search('thumb', $fields)] = 'img_name as thumb';
$options = $join_conds = array();
# Depends on $wgMiserMode
$tables[] = 'oldimage';
# Need to rewrite this one
- foreach ( $fields as &$field )
- if ( $field == 'count' )
+ foreach ( $fields as &$field ) {
+ if ( $field == 'count' ) {
$field = 'COUNT(oi_archive_name) as count';
+ }
+ }
unset( $field );
$dbr = wfGetDB( DB_SLAVE );
function formatValue( $field, $value ) {
global $wgLang;
switch ( $field ) {
+ case 'thumb':
+ $file = wfLocalFile( $value );
+ $thumb = $file->transform( array( 'width' => 180 ) );
+ return $thumb->toHtml( array( 'desc-link' => true ) );
case 'img_timestamp':
return htmlspecialchars( $wgLang->timeanddate( $value, true ) );
case 'img_name':
'listfiles_search_for' => 'Search for media name:',
'imgfile' => 'file',
'listfiles' => 'File list',
+'listfiles_thumb' => 'Thumbnail',
'listfiles_date' => 'Date',
'listfiles_name' => 'Name',
'listfiles_user' => 'User',