$icon= $this->displayImg->iconThumb();
$wgOut->addHTML( '<div class="fullImageLink" id="file">' .
- $icon->toHtml( array( 'desc-link' => true ) ) .
+ $icon->toHtml( array( 'file-link' => true ) ) .
"</div>\n" );
}
$this->img = $imagePage->getDisplayedFile();
$this->title = $imagePage->getTitle();
$this->imagePage = $imagePage;
- $this->showThumb = $wgShowArchiveThumbnails;
+ $this->showThumb = $wgShowArchiveThumbnails && $this->img->canRender();
}
public function getImagePage() {
. $navLinks . "\n"
. Xml::openElement( 'table', array( 'class' => 'wikitable filehistory' ) ) . "\n"
. '<tr><td></td>'
- . ( $this->current->isLocal() && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deleterevision') ) ? '<td></td>' : '' )
+ . ( $this->current->isLocal() && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deletedhistory') ) ? '<td></td>' : '' )
. '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>'
. ( $this->showThumb ? '<th>' . wfMsgHtml( 'filehist-thumb' ) . '</th>' : '' )
. '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>'
$row = $css = $selected = '';
// Deletion link
- if( $local && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deleterevision') ) ) {
+ if( $local && ($wgUser->isAllowed('delete') || $wgUser->isAllowed('deletedhistory') ) ) {
$row .= '<td>';
# Link to remove from history
if( $wgUser->isAllowed( 'delete' ) ) {
array(), $q, array( 'known' )
);
}
- # Link to hide content
- if( $wgUser->isAllowed( 'deleterevision' ) ) {
+ # Link to hide content. Don't show useless link to people who cannot hide revisions.
+ if( $wgUser->isAllowed('deleterevision') || ($wgUser->isAllowed('deletedhistory') && $file->getVisibility()) ) {
if( $wgUser->isAllowed('delete') ) {
$row .= '<br/>';
}
- $revdel = SpecialPage::getTitleFor( 'Revisiondelete' );
// If file is top revision or locked from this user, don't link
if( $iscur || !$file->userCan(File::DELETED_RESTRICTED) ) {
$del = wfMsgHtml( 'rev-delundel' );
} else {
list( $ts, $name ) = explode( '!', $img, 2 );
- $del = $this->skin->link( $revdel, wfMsgHtml( 'rev-delundel' ),
+ $del = $this->skin->link(
+ SpecialPage::getTitleFor( 'Revisiondelete' ),
+ wfMsgHtml( 'rev-delundel' ),
array(),
array(
'type' => 'oldimage',