Show thumbnails in the file history list. The dimensions are the same as in the defau...
authorRotem Liss <rotem@users.mediawiki.org>
Fri, 29 Aug 2008 11:54:34 +0000 (11:54 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Fri, 29 Aug 2008 11:54:34 +0000 (11:54 +0000)
CREDITS
RELEASE-NOTES
includes/ImagePage.php
languages/messages/MessagesEn.php
languages/messages/MessagesHe.php
maintenance/language/messages.inc

diff --git a/CREDITS b/CREDITS
index 719d461..8882c61 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -36,6 +36,7 @@ following names for their contribution to the product.
 * Victor Vasiliev
 
 == Patch Contributors ==
+* Agbad
 * Daniel Arnold
 * Danny B.
 * Jeremy Baron
index 6e7b0f6..b211511 100644 (file)
@@ -101,6 +101,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * BMP images are now displayed as PNG
 * (bug 13471) Added NUMBERINGROUP magic word
 * (bug 11884) Now support Flash EXIF attribute
+* Show thumbnails in the file history list
 
 === Bug fixes in 1.14 ===
 
index e370700..2f1faf8 100644 (file)
@@ -819,6 +819,7 @@ class ImageHistoryList {
                        . '<tr><td></td>'
                        . ( $this->current->isLocal() && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deleterevision') ) ? '<td></td>' : '' )
                        . '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>'
+                       . '<th>' . wfMsgHtml( 'filehist-thumb' ) . '</th>'
                        . '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>'
                        . '<th>' . wfMsgHtml( 'filehist-user' ) . '</th>'
                        . '<th>' . wfMsgHtml( 'filehist-comment' ) . '</th>'
@@ -921,6 +922,21 @@ class ImageHistoryList {
                        $row .= Xml::element( 'a', array( 'href' => $url ), $wgLang->timeAndDate( $timestamp, true ) );
                }
 
+               // Thumbnail
+               if( $file->allowInlineDisplay() && $file->userCan( File::DELETED_FILE ) && !$file->isDeleted( File::DELETED_FILE ) ) {
+                       $params = array(
+                               'width' => '120',
+                               'height' => '120',
+                       );
+                       $thumbnail = $file->transform( $params );
+                       $options = array(
+                               'alt' => wfMsg( 'filehist-thumbtext', $wgLang->timeAndDate( $timestamp, true ) ),
+                               'file-link' => true,
+                       );
+                       $row .= '</td><td>' . $thumbnail->toHtml( $options );
+               } else {
+                       $row .= '</td><td>' . wfMsg( 'filehist-nothumb' );
+               }
                $row .= "</td><td>";
 
                // Image dimensions
index 906bfe2..6deb21c 100644 (file)
@@ -1821,6 +1821,9 @@ A click on a column header changes the sorting.',
 'filehist-revert'                => 'revert',
 'filehist-current'               => 'current',
 'filehist-datetime'              => 'Date/Time',
+'filehist-thumb'                 => 'Thumbnail',
+'filehist-thumbtext'             => 'Thumbnail for version as of $1',
+'filehist-nothumb'               => 'No thumbnail',
 'filehist-user'                  => 'User',
 'filehist-dimensions'            => 'Dimensions',
 'filehist-filesize'              => 'File size',
index ad50543..bcb0e09 100644 (file)
@@ -1504,6 +1504,9 @@ PICT # שונות
 'filehist-revert'                => 'שחזור',
 'filehist-current'               => 'נוכחית',
 'filehist-datetime'              => 'תאריך/שעה',
+'filehist-thumb'                 => 'תמונה ממוזערת',
+'filehist-thumbtext'             => 'תמונה ממוזערת לגרסה מתאריך $1',
+'filehist-nothumb'               => 'אין תמונה ממוזערת',
 'filehist-user'                  => 'משתמש',
 'filehist-dimensions'            => 'ממדים',
 'filehist-filesize'              => 'גודל הקובץ',
index 91c7a34..3e89411 100644 (file)
@@ -1112,6 +1112,9 @@ $wgMessageStructure = array(
                'filehist-revert',
                'filehist-current',
                'filehist-datetime',
+               'filehist-thumb',
+               'filehist-thumbtext',
+               'filehist-nothumb',
                'filehist-user',
                'filehist-dimensions',
                'filehist-filesize',