Merge "[FileRepo] Made getDescription() respect *_deleted fields."
[lhc/web/wiklou.git] / includes / ImagePage.php
index 5dd1fb0..b1a5057 100644 (file)
@@ -1038,7 +1038,9 @@ class ImageHistoryList extends ContextSource {
                $row .= '<td>';
                if ( $iscur ) {
                        $row .= wfMsgHtml( 'filehist-current' );
-               } elseif ( $local && $user->isLoggedIn() && $this->title->userCan( 'edit' ) ) {
+               } elseif ( $local && $this->title->quickUserCan( 'edit' )
+                       && $this->title->quickUserCan( 'upload' )
+               ) {
                        if ( $file->isDeleted( File::DELETED_FILE ) ) {
                                $row .= wfMsgHtml( 'filehist-revert' );
                        } else {
@@ -1099,7 +1101,10 @@ class ImageHistoryList extends ContextSource {
                // Image dimensions + size
                $row .= '<td>';
                $row .= htmlspecialchars( $file->getDimensionsString() );
-               $row .= ' <span style="white-space: nowrap;">(' . Linker::formatSize( $file->getSize() ) . ')</span>';
+               $row .= $this->getContext()->msg( 'word-separator' )->plain();
+               $row .= '<span style="white-space: nowrap;">';
+               $row .= $this->getContext()->msg( 'parentheses' )->rawParams( Linker::formatSize( $file->getSize() ) )->plain();
+               $row .= '</span>';
                $row .= '</td>';
 
                // Uploading user