$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 {
// 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