8 if( !defined( 'MEDIAWIKI' ) )
12 * Special handling for image description pages
16 class ImagePage
extends Article
{
18 /* private */ var $img; // Image object this page is shown for
19 /* private */ var $repo;
20 var $mExtraDescription = false;
22 function __construct( $title, $time = false ) {
23 parent
::__construct( $title );
24 $this->img
= wfFindFile( $this->mTitle
, $time );
26 $this->img
= wfLocalFile( $this->mTitle
);
27 $this->current
= $this->img
;
29 $this->current
= $time ?
wfLocalFile( $this->mTitle
) : $this->img
;
31 $this->repo
= $this->img
->repo
;
35 * Handler for action=render
36 * Include body text only; none of the image extras
40 $wgOut->setArticleBodyOnly( true );
45 global $wgOut, $wgShowEXIF, $wgRequest, $wgUser;
47 if ( $this->img
->getRedirected() )
48 return Article
::view();
50 $diff = $wgRequest->getVal( 'diff' );
51 $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );
53 if ( $this->mTitle
->getNamespace() != NS_IMAGE ||
( isset( $diff ) && $diffOnly ) )
54 return Article
::view();
56 if ($wgShowEXIF && $this->img
->exists()) {
57 // FIXME: bad interface, see note on MediaHandler::formatMetadata().
58 $formattedMetadata = $this->img
->formatMetadata();
59 $showmeta = $formattedMetadata !== false;
64 if ($this->img
->exists())
65 $wgOut->addHTML($this->showTOC($showmeta));
67 $this->openShowImage();
69 # No need to display noarticletext, we use our own message, output in openShowImage()
70 if ( $this->getID() ) {
73 # Just need to set the right headers
74 $wgOut->setArticleFlag( true );
75 $wgOut->setRobotpolicy( 'noindex,nofollow' );
76 $wgOut->setPageTitle( $this->mTitle
->getPrefixedText() );
80 # Show shared description, if needed
81 if ( $this->mExtraDescription
) {
82 $fol = wfMsgNoTrans( 'shareddescriptionfollows' );
83 if( $fol != '-' && !wfEmptyMsg( 'shareddescriptionfollows', $fol ) ) {
84 $wgOut->addWikiText( $fol );
86 $wgOut->addHTML( '<div id="shared-image-desc">' . $this->mExtraDescription
. '</div>' );
88 $this->checkSharedConflict();
91 $this->closeShowImage();
92 $this->imageHistory();
96 global $wgStylePath, $wgStyleVersion;
97 $expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) );
98 $collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) );
99 $wgOut->addHTML( Xml
::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ). "\n" );
100 $wgOut->addWikiText( $this->makeMetadataTable( $formattedMetadata ) );
102 "<script type=\"text/javascript\" src=\"$wgStylePath/common/metadata.js?$wgStyleVersion\"></script>\n" .
103 "<script type=\"text/javascript\">attachMetadataToggle('mw_metadata', '$expand', '$collapse');</script>\n" );
107 public function getRedirectTarget() {
108 if ( $this->img
->isLocal() )
109 return parent
::getRedirectTarget();
111 // Foreign image page
112 $from = $this->img
->getRedirected();
113 return $this->mRedirectTarget
= Title
::makeTitle( NS_IMAGE
, $from );
121 * @param bool $metadata Whether or not to show the metadata link
124 function showTOC( $metadata ) {
126 $r = '<ul id="filetoc">
127 <li><a href="#file">' . $wgLang->getNsText( NS_IMAGE
) . '</a></li>
128 <li><a href="#filehistory">' . wfMsgHtml( 'filehist' ) . '</a></li>
129 <li><a href="#filelinks">' . wfMsgHtml( 'imagelinks' ) . '</a></li>' .
130 ($metadata ?
' <li><a href="#metadata">' . wfMsgHtml( 'metadata' ) . '</a></li>' : '') . '
136 * Make a table with metadata to be shown in the output page.
138 * FIXME: bad interface, see note on MediaHandler::formatMetadata().
142 * @param array $exif The array containing the EXIF data
145 function makeMetadataTable( $metadata ) {
146 $r = wfMsg( 'metadata-help' ) . "\n\n";
147 $r .= "{| id=mw_metadata class=mw_metadata\n";
148 foreach ( $metadata as $type => $stuff ) {
149 foreach ( $stuff as $v ) {
150 $class = Sanitizer
::escapeId( $v['id'] );
151 if( $type == 'collapsed' ) {
152 $class .= ' collapsable';
154 $r .= "|- class=\"$class\"\n";
155 $r .= "!| {$v['name']}\n";
156 $r .= "|| {$v['value']}\n";
164 * Overloading Article's getContent method.
166 * Omit noarticletext if sharedupload; text will be fetched from the
167 * shared upload server if possible.
169 function getContent() {
170 if( $this->img
&& !$this->img
->isLocal() && 0 == $this->getID() ) {
173 return Article
::getContent();
176 function openShowImage() {
177 global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang, $wgContLang;
179 $full_url = $this->img
->getURL();
180 $linkAttribs = false;
181 $sizeSel = intval( $wgUser->getOption( 'imagesize') );
182 if( !isset( $wgImageLimits[$sizeSel] ) ) {
183 $sizeSel = User
::getDefaultOption( 'imagesize' );
185 // The user offset might still be incorrect, specially if
186 // $wgImageLimits got changed (see bug #8858).
187 if( !isset( $wgImageLimits[$sizeSel] ) ) {
188 // Default to the first offset in $wgImageLimits
192 $max = $wgImageLimits[$sizeSel];
194 $maxHeight = $max[1];
195 $sk = $wgUser->getSkin();
196 $dirmark = $wgContLang->getDirMark();
198 if ( $this->img
->exists() ) {
200 $page = $wgRequest->getIntOrNull( 'page' );
201 if ( is_null( $page ) ) {
205 $params = array( 'page' => $page );
207 $width_orig = $this->img
->getWidth();
208 $width = $width_orig;
209 $height_orig = $this->img
->getHeight();
210 $height = $height_orig;
211 $mime = $this->img
->getMimeType();
213 $linkAttribs = array( 'href' => $full_url );
214 $longDesc = $this->img
->getLongDesc();
216 wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this , &$wgOut ) ) ;
218 if ( $this->img
->allowInlineDisplay() ) {
221 # "Download high res version" link below the image
222 #$msgsize = wfMsgHtml('file-info-size', $width_orig, $height_orig, $sk->formatSize( $this->img->getSize() ), $mime );
223 # We'll show a thumbnail of this image
224 if ( $width > $maxWidth ||
$height > $maxHeight ) {
225 # Calculate the thumbnail size.
226 # First case, the limiting factor is the width, not the height.
227 if ( $width / $height >= $maxWidth / $maxHeight ) {
228 $height = round( $height * $maxWidth / $width);
230 # Note that $height <= $maxHeight now.
232 $newwidth = floor( $width * $maxHeight / $height);
233 $height = round( $height * $newwidth / $width );
235 # Note that $height <= $maxHeight now, but might not be identical
236 # because of rounding.
238 $msgbig = wfMsgHtml( 'show-big-image' );
239 $msgsmall = wfMsgExt( 'show-big-image-thumb',
240 array( 'parseinline' ), $wgLang->formatNum( $width ), $wgLang->formatNum( $height ) );
242 # Image is small enough to show full size on image page
243 $msgbig = htmlspecialchars( $this->img
->getName() );
244 $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) );
247 $params['width'] = $width;
248 $thumbnail = $this->img
->transform( $params );
250 $anchorclose = "<br />";
251 if( $this->img
->mustRender() ) {
256 '<br />' . Xml
::tags( 'a', $linkAttribs, $msgbig ) . "$dirmark " . $longDesc;
259 if ( $this->img
->isMultipage() ) {
260 $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
265 'alt' => $this->img
->getTitle()->getPrefixedText(),
268 $wgOut->addHTML( '<div class="fullImageLink" id="file">' .
269 $thumbnail->toHtml( $options ) .
270 $anchorclose . '</div>' );
273 if ( $this->img
->isMultipage() ) {
274 $count = $this->img
->pageCount();
277 $label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false );
278 $link = $sk->makeKnownLinkObj( $this->mTitle
, $label, 'page='. ($page-1) );
279 $thumb1 = $sk->makeThumbLinkObj( $this->mTitle
, $this->img
, $link, $label, 'none',
280 array( 'page' => $page - 1 ) );
285 if ( $page < $count ) {
286 $label = wfMsg( 'imgmultipagenext' );
287 $link = $sk->makeKnownLinkObj( $this->mTitle
, $label, 'page='. ($page+
1) );
288 $thumb2 = $sk->makeThumbLinkObj( $this->mTitle
, $this->img
, $link, $label, 'none',
289 array( 'page' => $page +
1 ) );
295 $select = '<form name="pageselector" action="' .
296 htmlspecialchars( $wgScript ) .
297 '" method="get" onchange="document.pageselector.submit();">' .
298 Xml
::hidden( 'title', $this->getTitle()->getPrefixedDbKey() );
299 $select .= $wgOut->parse( wfMsg( 'imgmultigotopre' ), false ) .
300 ' <select id="pageselector" name="page">';
301 for ( $i=1; $i <= $count; $i++
) {
302 $select .= Xml
::option( $wgLang->formatNum( $i ), $i,
305 $select .= '</select>' . $wgOut->parse( wfMsg( 'imgmultigotopost' ), false ) .
306 '<input type="submit" value="' .
307 htmlspecialchars( wfMsg( 'imgmultigo' ) ) . '"></form>';
309 $wgOut->addHTML( '</td><td><div class="multipageimagenavbox">' .
310 "$select<hr />$thumb1\n$thumb2<br clear=\"all\" /></div></td></tr></table>" );
313 #if direct link is allowed but it's not a renderable image, show an icon.
314 if ($this->img
->isSafeFile()) {
315 $icon= $this->img
->iconThumb();
317 $wgOut->addHTML( '<div class="fullImageLink" id="file">' .
318 $icon->toHtml( array( 'desc-link' => true ) ) .
327 $filename = wfEscapeWikiText( $this->img
->getName() );
329 if (!$this->img
->isSafeFile()) {
330 $warning = wfMsgNoTrans( 'mediawarning' );
331 $wgOut->addWikiText( <<<EOT
332 <div class="fullMedia">
333 <span class="dangerousLink">[[Media:$filename|$filename]]</span>$dirmark
334 <span class="fileInfo"> $longDesc</span>
337 <div class="mediaWarning">$warning</div>
341 $wgOut->addWikiText( <<<EOT
342 <div class="fullMedia">
343 [[Media:$filename|$filename]]$dirmark <span class="fileInfo"> $longDesc</span>
350 if(!$this->img
->isLocal()) {
351 $this->printSharedImageText();
354 # Image does not exist
356 $title = SpecialPage
::getTitleFor( 'Upload' );
357 $link = $sk->makeKnownLinkObj($title, wfMsgHtml('noimage-linktext'),
358 'wpDestFile=' . urlencode( $this->img
->getName() ) );
359 $wgOut->addHTML( wfMsgWikiHtml( 'noimage', $link ) );
364 * Show a notice that the file is from a shared repository
366 function printSharedImageText() {
367 global $wgOut, $wgUser;
369 $descUrl = $this->img
->getDescriptionUrl();
370 $descText = $this->img
->getDescriptionText();
371 $s = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml( 'sharedupload' );
373 $sk = $wgUser->getSkin();
374 $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadwiki-linktext' ) );
375 $msg = ( $descText ) ?
'shareduploadwiki-desc' : 'shareduploadwiki';
376 $msg = wfMsgExt( $msg, array( 'parseinline', 'replaceafter' ), $link );
378 # Show message only if not voided by local sysops
383 $wgOut->addHTML( $s );
386 $this->mExtraDescription
= $descText;
390 function checkSharedConflict() {
391 global $wgOut, $wgUser;
392 $repoGroup = RepoGroup
::singleton();
393 if( !$repoGroup->hasForeignRepos() ) {
396 if( !$this->img
->isLocal() ) {
400 $this->dupFile
= null;
401 $repoGroup->forEachForeignRepo( array( $this, 'checkSharedConflictCallback' ) );
403 if( !$this->dupFile
)
405 $dupfile = $this->dupFile
;
407 ($this->img
->getSha1() == $dupfile->getSha1()) &&
408 ($this->img
->getSize() == $dupfile->getSize())
411 $sk = $wgUser->getSkin();
412 $descUrl = $dupfile->getDescriptionUrl();
414 $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadduplicate-linktext' ) );
415 $wgOut->addHTML( '<div id="shared-image-dup">' . wfMsgWikiHtml( 'shareduploadduplicate', $link ) . '</div>' );
417 $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadconflict-linktext' ) );
418 $wgOut->addHTML( '<div id="shared-image-conflict">' . wfMsgWikiHtml( 'shareduploadconflict', $link ) . '</div>' );
422 function checkSharedConflictCallback( $repo ) {
423 $dupfile = $repo->newFile( $this->img
->getTitle() );
424 if( $dupfile->exists() )
425 $this->dupFile
= $dupfile;
426 return $dupfile->exists();
429 function getUploadUrl() {
430 $uploadTitle = SpecialPage
::getTitleFor( 'Upload' );
431 return $uploadTitle->getFullUrl( 'wpDestFile=' . urlencode( $this->img
->getName() ) );
435 * Print out the various links at the bottom of the image page, e.g. reupload,
436 * external editing (and instructions link) etc.
438 function uploadLinksBox() {
439 global $wgUser, $wgOut;
441 if( !$this->img
->isLocal() )
444 $sk = $wgUser->getSkin();
446 $wgOut->addHtml( '<br /><ul>' );
448 # "Upload a new version of this file" link
449 if( UploadForm
::userCanReUpload($wgUser,$this->img
->name
) ) {
450 $ulink = $sk->makeExternalLink( $this->getUploadUrl(), wfMsg( 'uploadnewversion-linktext' ) );
451 $wgOut->addHtml( "<li><div class='plainlinks'>{$ulink}</div></li>" );
454 # Link to Special:FileDuplicateSearch
455 $dupeLink = $sk->makeKnownLinkObj( SpecialPage
::getTitleFor( 'FileDuplicateSearch', $this->mTitle
->getDBkey() ), wfMsgHtml( 'imagepage-searchdupe' ) );
456 $wgOut->addHtml( "<li>{$dupeLink}</li>" );
458 # External editing link
459 $elink = $sk->makeKnownLinkObj( $this->mTitle
, wfMsgHtml( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
460 $wgOut->addHtml( '<li>' . $elink . '<div>' . wfMsgWikiHtml( 'edit-externally-help' ) . '</div></li>' );
462 $wgOut->addHtml( '</ul>' );
465 function closeShowImage()
472 * If the page we've just displayed is in the "Image" namespace,
473 * we follow it with an upload history of the image and its usage.
475 function imageHistory()
477 global $wgUser, $wgOut, $wgUseExternalEditor;
479 $sk = $wgUser->getSkin();
481 if ( $this->img
->exists() ) {
482 $list = new ImageHistoryList( $sk, $this->current
);
483 $file = $this->current
;
484 $dims = $file->getDimensionsString();
485 $s = $list->beginImageHistoryList() .
486 $list->imageHistoryLine( true, $file );
487 // old image versions
488 $hist = $this->img
->getHistory();
489 foreach( $hist as $file ) {
490 $dims = $file->getDimensionsString();
491 $s .= $list->imageHistoryLine( false, $file );
493 $s .= $list->endImageHistoryList();
495 $wgOut->addHTML( $s );
497 $this->img
->resetHistory(); // free db resources
499 # Exist check because we don't want to show this on pages where an image
500 # doesn't exist along with the noimage message, that would suck. -ævar
501 if( $wgUseExternalEditor && $this->img
->exists() ) {
502 $this->uploadLinksBox();
507 function imageLinks()
509 global $wgUser, $wgOut;
511 $wgOut->addHTML( Xml
::element( 'h2', array( 'id' => 'filelinks' ), wfMsg( 'imagelinks' ) ) . "\n" );
513 $dbr = wfGetDB( DB_SLAVE
);
514 $page = $dbr->tableName( 'page' );
515 $imagelinks = $dbr->tableName( 'imagelinks' );
517 $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
518 $dbr->addQuotes( $this->mTitle
->getDBkey() ) . " AND il_from=page_id";
519 $sql = $dbr->limitResult($sql, 500, 0);
520 $res = $dbr->query( $sql, "ImagePage::imageLinks" );
522 if ( 0 == $dbr->numRows( $res ) ) {
523 $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
526 $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) . "</p>\n<ul>" );
528 $sk = $wgUser->getSkin();
529 while ( $s = $dbr->fetchObject( $res ) ) {
530 $name = Title
::MakeTitle( $s->page_namespace
, $s->page_title
);
531 $link = $sk->makeKnownLinkObj( $name, "" );
532 $wgOut->addHTML( "<li>{$link}</li>\n" );
534 $wgOut->addHTML( "</ul>\n" );
538 * Delete the file, or an earlier version of it
540 public function delete() {
541 if( !$this->img
->exists() ||
!$this->img
->isLocal() ) {
542 // Standard article deletion
546 $deleter = new FileDeleteForm( $this->img
);
551 * Revert the file to an earlier version
553 public function revert() {
554 $reverter = new FileRevertForm( $this->img
);
555 $reverter->execute();
559 * Override handling of action=purge
562 if( $this->img
->exists() ) {
563 wfDebug( "ImagePage::doPurge purging " . $this->img
->getName() . "\n" );
564 $update = new HTMLCacheUpdate( $this->mTitle
, 'imagelinks' );
566 $this->img
->upgradeRow();
567 $this->img
->purgeCache();
569 wfDebug( "ImagePage::doPurge no image\n" );
575 * Display an error with a wikitext description
577 function showError( $description ) {
579 $wgOut->setPageTitle( wfMsg( "internalerror" ) );
580 $wgOut->setRobotpolicy( "noindex,nofollow" );
581 $wgOut->setArticleRelated( false );
582 $wgOut->enableClientCache( false );
583 $wgOut->addWikiText( $description );
589 * Builds the image revision log shown on image pages
593 class ImageHistoryList
{
595 protected $img, $skin, $title, $repo;
597 public function __construct( $skin, $img ) {
600 $this->title
= $img->getTitle();
603 public function beginImageHistoryList() {
604 global $wgOut, $wgUser;
605 $deleteColumn = $wgUser->isAllowed( 'delete' ) ||
$wgUser->isAllowed( 'deleterevision' );
606 return Xml
::element( 'h2', array( 'id' => 'filehistory' ), wfMsg( 'filehist' ) )
607 . $wgOut->parse( wfMsgNoTrans( 'filehist-help' ) )
608 . Xml
::openElement( 'table', array( 'class' => 'filehistory' ) ) . "\n"
610 . ( $this->img
->isLocal() && $deleteColumn ?
'<td></td>' : '' )
611 . '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>'
612 . '<th>' . wfMsgHtml( 'filehist-user' ) . '</th>'
613 . '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>'
614 . '<th class="mw-imagepage-filesize">' . wfMsgHtml( 'filehist-filesize' ) . '</th>'
615 . '<th>' . wfMsgHtml( 'filehist-comment' ) . '</th>'
619 public function endImageHistoryList() {
623 public function imageHistoryLine( $iscur, $file ) {
624 global $wgUser, $wgLang, $wgContLang, $wgTitle;
626 $timestamp = wfTimestamp(TS_MW
, $file->getTimestamp());
627 $img = $iscur ?
$file->getName() : $file->getArchiveName();
628 $user = $file->getUser('id');
629 $usertext = $file->getUser('text');
630 $size = $file->getSize();
631 $description = $file->getDescription();
632 $dims = $file->getDimensionsString();
633 $sha1 = $file->getSha1();
635 $local = $this->img
->isLocal();
639 if( $local && ($wgUser->isAllowed('delete') ||
$wgUser->isAllowed('deleterevision') ) ) {
641 # Link to remove from history
642 if( $wgUser->isAllowed( 'delete' ) ) {
644 $q[] = 'action=delete';
646 $q[] = 'oldimage=' . urlencode( $img );
647 $row .= $this->skin
->makeKnownLinkObj(
649 wfMsgHtml( $iscur ?
'filehist-deleteall' : 'filehist-deleteone' ),
654 # Link to hide content
655 if( $wgUser->isAllowed( 'deleterevision' ) ) {
656 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
657 // If file is top revision or locked from this user, don't link
658 if( $iscur ||
!$file->userCan(File
::DELETED_RESTRICTED
) ) {
659 $del = wfMsgHtml( 'rev-delundel' );
661 // If the file was hidden, link to sha-1
662 list($ts,$name) = explode('!',$img,2);
663 $del = $this->skin
->makeKnownLinkObj( $revdel, wfMsg( 'rev-delundel' ),
664 'target=' . urlencode( $wgTitle->getPrefixedText() ) .
665 '&oldimage=' . urlencode( $ts ) );
666 // Bolden oversighted content
667 if( $file->isDeleted(File
::DELETED_RESTRICTED
) )
668 $del = "<strong>$del</strong>";
670 $row .= "<tt><small>$del</small></tt>";
675 // Reversion link/current indicator
678 $row .= wfMsgHtml( 'filehist-current' );
679 } elseif( $local && $wgUser->isLoggedIn() && $this->title
->userCan( 'edit' ) ) {
680 if( $file->isDeleted(File
::DELETED_FILE
) ) {
681 $row .= wfMsgHtml('filehist-revert');
684 $q[] = 'action=revert';
685 $q[] = 'oldimage=' . urlencode( $img );
686 $q[] = 'wpEditToken=' . urlencode( $wgUser->editToken( $img ) );
687 $row .= $this->skin
->makeKnownLinkObj( $this->title
,
688 wfMsgHtml( 'filehist-revert' ),
689 implode( '&', $q ) );
694 // Date/time and image link
696 if( !$file->userCan(File
::DELETED_FILE
) ) {
697 # Don't link to unviewable files
698 $row .= '<span class="history-deleted">' . $wgLang->timeAndDate( $timestamp, true ) . '</span>';
699 } else if( $file->isDeleted(File
::DELETED_FILE
) ) {
700 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
701 # Make a link to review the image
702 $url = $this->skin
->makeKnownLinkObj( $revdel, $wgLang->timeAndDate( $timestamp, true ),
703 "target=".$wgTitle->getPrefixedText()."&file=$sha1.".$this->img
->getExtension() );
704 $row .= '<span class="history-deleted">'.$url.'</span>';
706 $url = $iscur ?
$this->img
->getUrl() : $this->img
->getArchiveUrl( $img );
707 $row .= Xml
::element( 'a',
708 array( 'href' => $url ),
709 $wgLang->timeAndDate( $timestamp, true ) );
717 // Hide deleted usernames
718 if( $file->isDeleted(File
::DELETED_USER
) )
719 $row .= '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
721 $row .= $this->skin
->userLink( $user, $usertext ) .
722 $this->skin
->userToolLinks( $user, $usertext );
724 $row .= htmlspecialchars( $usertext );
729 $row .= '<td>' . htmlspecialchars( $dims ) . '</td>';
732 $row .= '<td class="mw-imagepage-filesize">' . $this->skin
->formatSize( $size ) . '</td>';
734 // Don't show deleted descriptions
735 if ( $file->isDeleted(File
::DELETED_COMMENT
) )
736 $row .= '<td><span class="history-deleted">' . wfMsgHtml('rev-deleted-comment') . '</span></td>';
738 $row .= '<td>' . $this->skin
->commentBlock( $description, $this->title
) . '</td>';
740 return "<tr>{$row}</tr>\n";