| Index: trunk/phase3/maintenance/language/messages.inc |
| — | — | @@ -1354,6 +1354,7 @@ |
| 1355 | 1355 | 'listfiles_search_for', |
| 1356 | 1356 | 'imgfile', |
| 1357 | 1357 | 'listfiles', |
| | 1358 | + 'listfiles_thumbnail', |
| 1358 | 1359 | 'listfiles_date', |
| 1359 | 1360 | 'listfiles_name', |
| 1360 | 1361 | 'listfiles_user', |
| Index: trunk/phase3/includes/specials/SpecialListfiles.php |
| — | — | @@ -74,6 +74,7 @@ |
| 75 | 75 | if ( !$this->mFieldNames ) { |
| 76 | 76 | global $wgMiserMode; |
| 77 | 77 | $this->mFieldNames = array( |
| | 78 | + 'thumb' => wfMsg( 'listfiles_thumb' ), |
| 78 | 79 | 'img_timestamp' => wfMsg( 'listfiles_date' ), |
| 79 | 80 | 'img_name' => wfMsg( 'listfiles_name' ), |
| 80 | 81 | 'img_user_text' => wfMsg( 'listfiles_user' ), |
| — | — | @@ -100,6 +101,7 @@ |
| 101 | 102 | $tables = array( 'image' ); |
| 102 | 103 | $fields = array_keys( $this->getFieldNames() ); |
| 103 | 104 | $fields[] = 'img_user'; |
| | 105 | + $fields[array_search('thumb', $fields)] = 'img_name as thumb'; |
| 104 | 106 | $options = $join_conds = array(); |
| 105 | 107 | |
| 106 | 108 | # Depends on $wgMiserMode |
| — | — | @@ -107,9 +109,11 @@ |
| 108 | 110 | $tables[] = 'oldimage'; |
| 109 | 111 | |
| 110 | 112 | # Need to rewrite this one |
| 111 | | - foreach ( $fields as &$field ) |
| 112 | | - if ( $field == 'count' ) |
| | 113 | + foreach ( $fields as &$field ) { |
| | 114 | + if ( $field == 'count' ) { |
| 113 | 115 | $field = 'COUNT(oi_archive_name) as count'; |
| | 116 | + } |
| | 117 | + } |
| 114 | 118 | unset( $field ); |
| 115 | 119 | |
| 116 | 120 | $dbr = wfGetDB( DB_SLAVE ); |
| — | — | @@ -153,6 +157,10 @@ |
| 154 | 158 | function formatValue( $field, $value ) { |
| 155 | 159 | global $wgLang; |
| 156 | 160 | switch ( $field ) { |
| | 161 | + case 'thumb': |
| | 162 | + $file = wfLocalFile( $value ); |
| | 163 | + $thumb = $file->transform( array( 'width' => 180 ) ); |
| | 164 | + return $thumb->toHtml( array( 'desc-link' => true ) ); |
| 157 | 165 | case 'img_timestamp': |
| 158 | 166 | return htmlspecialchars( $wgLang->timeanddate( $value, true ) ); |
| 159 | 167 | case 'img_name': |
| Index: trunk/phase3/languages/messages/MessagesEn.php |
| — | — | @@ -2258,6 +2258,7 @@ |
| 2259 | 2259 | 'listfiles_search_for' => 'Search for media name:', |
| 2260 | 2260 | 'imgfile' => 'file', |
| 2261 | 2261 | 'listfiles' => 'File list', |
| | 2262 | +'listfiles_thumb' => 'Thumbnail', |
| 2262 | 2263 | 'listfiles_date' => 'Date', |
| 2263 | 2264 | 'listfiles_name' => 'Name', |
| 2264 | 2265 | 'listfiles_user' => 'User', |
| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -185,6 +185,7 @@ |
| 186 | 186 | * Maintenance scripts get a --memory-limit option to override defaults (which |
| 187 | 187 | is usually to set it to -1 to disable the limit) |
| 188 | 188 | * (bug 25397) Allow uploading (not displaying) of WebP images, disabled by default |
| | 189 | +* (bug 23194) Special:ListFiles now has thumbnails |
| 189 | 190 | |
| 190 | 191 | === Bug fixes in 1.17 === |
| 191 | 192 | * (bug 17560) Half-broken deletion moved image files to deletion archive |