9 if( !defined( 'MEDIAWIKI' ) )
13 * Special handling for image description pages
16 class ImagePage
extends Article
{
18 /* private */ var $img; // Image object this page is shown for
19 var $mExtraDescription = false;
22 * Handler for action=render
23 * Include body text only; none of the image extras
27 $wgOut->setArticleBodyOnly( true );
28 $wgOut->addSecondaryWikitext( $this->getContent() );
32 global $wgOut, $wgShowEXIF, $wgRequest, $wgUser;
34 $this->img
= new Image( $this->mTitle
);
36 $diff = $wgRequest->getVal( 'diff' );
37 $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );
39 if ( $this->mTitle
->getNamespace() != NS_IMAGE ||
( isset( $diff ) && $diffOnly ) )
40 return Article
::view();
42 if ($wgShowEXIF && $this->img
->exists()) {
43 $exif = $this->img
->getExifData();
44 $showmeta = count($exif) ?
true : false;
50 if ($this->img
->exists())
51 $wgOut->addHTML($this->showTOC($showmeta));
53 $this->openShowImage();
55 # No need to display noarticletext, we use our own message, output in openShowImage()
56 if ( $this->getID() ) {
59 # Just need to set the right headers
60 $wgOut->setArticleFlag( true );
61 $wgOut->setRobotpolicy( 'index,follow' );
62 $wgOut->setPageTitle( $this->mTitle
->getPrefixedText() );
66 # Show shared description, if needed
67 if ( $this->mExtraDescription
) {
68 $fol = wfMsg( 'shareddescriptionfollows' );
70 $wgOut->addWikiText( $fol );
72 $wgOut->addHTML( '<div id="shared-image-desc">' . $this->mExtraDescription
. '</div>' );
75 $this->closeShowImage();
76 $this->imageHistory();
80 global $wgStylePath, $wgStyleVersion;
81 $expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) );
82 $collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) );
83 $wgOut->addHTML( Xml
::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ). "\n" );
84 $wgOut->addWikiText( $this->makeMetadataTable( $exif ) );
86 "<script type=\"text/javascript\" src=\"$wgStylePath/common/metadata.js?$wgStyleVersion\"></script>\n" .
87 "<script type=\"text/javascript\">attachMetadataToggle('mw_metadata', '$expand', '$collapse');</script>\n" );
96 * @param bool $metadata Whether or not to show the metadata link
99 function showTOC( $metadata ) {
101 $r = '<ul id="filetoc">
102 <li><a href="#file">' . $wgLang->getNsText( NS_IMAGE
) . '</a></li>
103 <li><a href="#filehistory">' . wfMsgHtml( 'imghistory' ) . '</a></li>
104 <li><a href="#filelinks">' . wfMsgHtml( 'imagelinks' ) . '</a></li>' .
105 ($metadata ?
'<li><a href="#metadata">' . wfMsgHtml( 'metadata' ) . '</a></li>' : '') . '
111 * Make a table with metadata to be shown in the output page.
115 * @param array $exif The array containing the EXIF data
118 function makeMetadataTable( $exif ) {
119 $r = wfMsg( 'metadata-help' ) . "\n\n";
120 $r .= "{| id=mw_metadata class=mw_metadata\n";
121 $visibleFields = $this->visibleMetadataFields();
122 foreach( $exif as $k => $v ) {
123 $tag = strtolower( $k );
124 $msg = wfMsg( "exif-$tag" );
125 $class = "exif-$tag";
126 if( !in_array( $tag, $visibleFields ) ) {
127 $class .= ' collapsable';
129 $r .= "|- class=\"$class\"\n";
138 * Get a list of EXIF metadata items which should be displayed when
139 * the metadata table is collapsed.
141 * @return array of strings
144 function visibleMetadataFields() {
146 $lines = explode( "\n", wfMsgForContent( 'metadata-fields' ) );
147 foreach( $lines as $line ) {
149 if( preg_match( '/^\\*\s*(.*?)\s*$/', $line, $matches ) ) {
150 $fields[] = $matches[1];
157 * Overloading Article's getContent method.
159 * Omit noarticletext if sharedupload; text will be fetched from the
160 * shared upload server if possible.
162 function getContent() {
163 if( $this->img
&& $this->img
->fromSharedDirectory
&& 0 == $this->getID() ) {
166 return Article
::getContent();
169 function openShowImage() {
170 global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang;
171 global $wgUseImageResize, $wgGenerateThumbnailOnParse;
173 $full_url = $this->img
->getURL();
176 $sizeSel = intval( $wgUser->getOption( 'imagesize') );
178 if( !isset( $wgImageLimits[$sizeSel] ) ) {
179 $sizeSel = User
::getDefaultOption( 'imagesize' );
181 $max = $wgImageLimits[$sizeSel];
183 $maxHeight = $max[1];
184 $sk = $wgUser->getSkin();
186 if ( $this->img
->exists() ) {
188 $page = $wgRequest->getIntOrNull( 'page' );
189 if ( ! is_null( $page ) ) {
190 $this->img
->selectPage( $page );
194 $width = $this->img
->getWidth();
195 $height = $this->img
->getHeight();
198 if ( $this->img
->allowInlineDisplay() and $width and $height) {
201 # "Download high res version" link below the image
202 $msg = wfMsgHtml('showbigimage', $width, $height, intval( $this->img
->getSize()/1024 ) );
204 # We'll show a thumbnail of this image
205 if ( $width > $maxWidth ||
$height > $maxHeight ) {
206 # Calculate the thumbnail size.
207 # First case, the limiting factor is the width, not the height.
208 if ( $width / $height >= $maxWidth / $maxHeight ) {
209 $height = round( $height * $maxWidth / $width);
211 # Note that $height <= $maxHeight now.
213 $newwidth = floor( $width * $maxHeight / $height);
214 $height = round( $height * $newwidth / $width );
216 # Note that $height <= $maxHeight now, but might not be identical
217 # because of rounding.
220 if( $wgUseImageResize ) {
221 $thumbnail = $this->img
->getThumbnail( $width, -1, $wgGenerateThumbnailOnParse );
222 if ( $thumbnail == null ) {
223 $url = $this->img
->getViewURL();
225 $url = $thumbnail->getURL();
228 # No resize ability? Show the full image, but scale
229 # it down in the browser so it fits on the page.
230 $url = $this->img
->getViewURL();
232 $anchoropen = "<a href=\"{$full_url}\">";
233 $anchorclose = "</a><br />";
234 if( $this->img
->mustRender() ) {
237 $anchorclose .= "\n$anchoropen{$msg}</a>";
240 $url = $this->img
->getViewURL();
244 if ( $this->img
->isMultipage() ) {
245 $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
248 $wgOut->addHTML( '<div class="fullImageLink" id="file">' . $anchoropen .
249 "<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" .
250 htmlspecialchars( $this->img
->getTitle()->getPrefixedText() ).'" />' . $anchorclose . '</div>' );
252 if ( $this->img
->isMultipage() ) {
253 $count = $this->img
->pageCount();
256 $label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false );
257 $link = $sk->makeLinkObj( $this->mTitle
, $label, 'page='. ($page-1) );
258 $this->img
->selectPage( $page - 1 );
259 $thumb1 = $sk->makeThumbLinkObj( $this->img
, $link, $label, 'none' );
264 if ( $page < $count ) {
265 $label = wfMsg( 'imgmultipagenext' );
266 $this->img
->selectPage( $page +
1 );
267 $link = $sk->makeLinkObj( $this->mTitle
, $label, 'page='. ($page+
1) );
268 $thumb2 = $sk->makeThumbLinkObj( $this->img
, $link, $label, 'none' );
273 $select = '<form name="pageselector" action="' . $this->img
->getEscapeLocalUrl( '' ) . '" method="GET" onchange="document.pageselector.submit();">' ;
274 $select .= $wgOut->parse( wfMsg( 'imgmultigotopre' ), false ) .
275 ' <select id="pageselector" name="page">';
276 for ( $i=1; $i <= $count; $i++
) {
277 $select .= Xml
::option( $wgLang->formatNum( $i ), $i,
280 $select .= '</select>' . $wgOut->parse( wfMsg( 'imgmultigotopost' ), false ) .
281 '<input type="submit" value="' .
282 htmlspecialchars( wfMsg( 'imgmultigo' ) ) . '"></form>';
284 $wgOut->addHTML( '</td><td><div class="multipageimagenavbox">' .
285 "$select<hr />$thumb1\n$thumb2<br clear=\"all\" /></div></td></tr></table>" );
288 #if direct link is allowed but it's not a renderable image, show an icon.
289 if ($this->img
->isSafeFile()) {
290 $icon= $this->img
->iconThumb();
292 $wgOut->addHTML( '<div class="fullImageLink" id="file"><a href="' . $full_url . '">' .
302 $filename = wfEscapeWikiText( $this->img
->getName() );
303 // Hacky workaround: for some reason we use the incorrect MIME type
304 // image/svg for SVG. This should be fixed internally, but at least
305 // make the displayed type right.
306 $mime = $this->img
->getMimeType();
307 if ($mime == 'image/svg') $mime = 'image/svg+xml';
309 $info = wfMsg( 'fileinfo',
310 ceil($this->img
->getSize()/1024.0),
314 $dirmark = $wgContLang->getDirMark();
315 if (!$this->img
->isSafeFile()) {
316 $warning = wfMsg( 'mediawarning' );
317 $wgOut->addWikiText( <<<END
318 <div class="fullMedia">
319 <span class="dangerousLink">[[Media:$filename|$filename]]</span>$dirmark
320 <span class="fileInfo"> ($info)</span>
323 <div class="mediaWarning">$warning</div>
327 $wgOut->addWikiText( <<<END
328 <div class="fullMedia">
329 [[Media:$filename|$filename]]$dirmark <span class="fileInfo"> ($info)</span>
336 if($this->img
->fromSharedDirectory
) {
337 $this->printSharedImageText();
340 # Image does not exist
342 $title = SpecialPage
::getTitleFor( 'Upload' );
343 $link = $sk->makeKnownLinkObj($title, wfMsgHtml('noimage-linktext'),
344 'wpDestFile=' . urlencode( $this->img
->getName() ) );
345 $wgOut->addHTML( wfMsgWikiHtml( 'noimage', $link ) );
349 function printSharedImageText() {
350 global $wgRepositoryBaseUrl, $wgFetchCommonsDescriptions, $wgOut, $wgUser;
352 $url = $wgRepositoryBaseUrl . urlencode($this->mTitle
->getDBkey());
353 $sharedtext = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml("sharedupload");
354 if ($wgRepositoryBaseUrl && !$wgFetchCommonsDescriptions) {
356 $sk = $wgUser->getSkin();
357 $title = SpecialPage
::getTitleFor( 'Upload' );
358 $link = $sk->makeKnownLinkObj($title, wfMsgHtml('shareduploadwiki-linktext'),
359 array( 'wpDestFile' => urlencode( $this->img
->getName() )));
360 $sharedtext .= " " . wfMsgWikiHtml('shareduploadwiki', $link);
362 $sharedtext .= "</div>";
363 $wgOut->addHTML($sharedtext);
365 if ($wgRepositoryBaseUrl && $wgFetchCommonsDescriptions) {
366 $text = Http
::get($url . '?action=render');
368 $this->mExtraDescription
= $text;
372 function getUploadUrl() {
374 $uploadTitle = SpecialPage
::getTitleFor( 'Upload' );
375 return $wgServer . $uploadTitle->getLocalUrl( 'wpDestFile=' . urlencode( $this->img
->getName() ) );
379 * Print out the various links at the bottom of the image page, e.g. reupload,
380 * external editing (and instructions link) etc.
382 function uploadLinksBox() {
383 global $wgUser, $wgOut;
385 if( $this->img
->fromSharedDirectory
)
388 $sk = $wgUser->getSkin();
390 $wgOut->addHtml( '<br /><ul>' );
392 # "Upload a new version of this file" link
393 if( $wgUser->isAllowed( 'reupload' ) ) {
394 $ulink = $sk->makeExternalLink( $this->getUploadUrl(), wfMsg( 'uploadnewversion-linktext' ) );
395 $wgOut->addHtml( "<li><div>{$ulink}</div></li>" );
398 # External editing link
399 $elink = $sk->makeKnownLinkObj( $this->mTitle
, wfMsgHtml( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
400 $wgOut->addHtml( '<li>' . $elink . '<div>' . wfMsgWikiHtml( 'edit-externally-help' ) . '</div></li>' );
402 $wgOut->addHtml( '</ul>' );
405 function closeShowImage()
412 * If the page we've just displayed is in the "Image" namespace,
413 * we follow it with an upload history of the image and its usage.
415 function imageHistory()
417 global $wgUser, $wgOut, $wgUseExternalEditor;
419 $sk = $wgUser->getSkin();
421 $line = $this->img
->nextHistoryLine();
424 $list = new ImageHistoryList( $sk );
425 $s = $list->beginImageHistoryList() .
426 $list->imageHistoryLine( true, wfTimestamp(TS_MW
, $line->img_timestamp
),
427 $this->mTitle
->getDBkey(), $line->img_user
,
428 $line->img_user_text
, $line->img_size
, $line->img_description
,
429 $line->img_width
, $line->img_height
432 while ( $line = $this->img
->nextHistoryLine() ) {
433 $s .= $list->imageHistoryLine( false, $line->img_timestamp
,
434 $line->oi_archive_name
, $line->img_user
,
435 $line->img_user_text
, $line->img_size
, $line->img_description
,
436 $line->img_width
, $line->img_height
439 $s .= $list->endImageHistoryList();
441 $wgOut->addHTML( $s );
443 # Exist check because we don't want to show this on pages where an image
444 # doesn't exist along with the noimage message, that would suck. -ævar
445 if( $wgUseExternalEditor && $this->img
->exists() ) {
446 $this->uploadLinksBox();
451 function imageLinks()
453 global $wgUser, $wgOut;
455 $wgOut->addHTML( Xml
::element( 'h2', array( 'id' => 'filelinks' ), wfMsg( 'imagelinks' ) ) . "\n" );
457 $dbr =& wfGetDB( DB_SLAVE
);
458 $page = $dbr->tableName( 'page' );
459 $imagelinks = $dbr->tableName( 'imagelinks' );
461 $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
462 $dbr->addQuotes( $this->mTitle
->getDBkey() ) . " AND il_from=page_id";
463 $sql = $dbr->limitResult($sql, 500, 0);
464 $res = $dbr->query( $sql, "ImagePage::imageLinks" );
466 if ( 0 == $dbr->numRows( $res ) ) {
467 $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
470 $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) . "</p>\n<ul>" );
472 $sk = $wgUser->getSkin();
473 while ( $s = $dbr->fetchObject( $res ) ) {
474 $name = Title
::MakeTitle( $s->page_namespace
, $s->page_title
);
475 $link = $sk->makeKnownLinkObj( $name, "" );
476 $wgOut->addHTML( "<li>{$link}</li>\n" );
478 $wgOut->addHTML( "</ul>\n" );
483 global $wgUser, $wgOut, $wgRequest;
485 $confirm = $wgRequest->wasPosted();
486 $reason = $wgRequest->getVal( 'wpReason' );
487 $image = $wgRequest->getVal( 'image' );
488 $oldimage = $wgRequest->getVal( 'oldimage' );
490 # Only sysops can delete images. Previously ordinary users could delete
491 # old revisions, but this is no longer the case.
492 if ( !$wgUser->isAllowed('delete') ) {
493 $wgOut->permissionRequired( 'delete' );
496 if ( $wgUser->isBlocked() ) {
497 return $this->blockedIPpage();
499 if ( wfReadOnly() ) {
500 $wgOut->readOnlyPage();
504 # Better double-check that it hasn't been deleted yet!
505 $wgOut->setPagetitle( wfMsg( 'confirmdelete' ) );
506 if ( ( !is_null( $image ) )
507 && ( '' == trim( $image ) ) ) {
508 $wgOut->showFatalError( wfMsg( 'cannotdelete' ) );
512 $this->img
= new Image( $this->mTitle
);
514 # Deleting old images doesn't require confirmation
515 if ( !is_null( $oldimage ) ||
$confirm ) {
516 if( $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
517 $this->doDelete( $reason );
519 $wgOut->showFatalError( wfMsg( 'sessionfailure' ) );
524 if ( !is_null( $image ) ) {
525 $q = '&image=' . urlencode( $image );
526 } else if ( !is_null( $oldimage ) ) {
527 $q = '&oldimage=' . urlencode( $oldimage );
531 return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) );
536 * @param $reason User provided reason for deletion.
538 function doDelete( $reason ) {
539 global $wgOut, $wgRequest;
541 $oldimage = $wgRequest->getVal( 'oldimage' );
543 if ( !is_null( $oldimage ) ) {
544 if ( strlen( $oldimage ) < 16 ) {
545 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
548 if ( strstr( $oldimage, "/" ) ||
strstr( $oldimage, "\\" ) ) {
549 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
552 if ( !$this->doDeleteOldImage( $oldimage ) ) {
555 $deleted = $oldimage;
557 $ok = $this->img
->delete( $reason );
559 # If the deletion operation actually failed, bug out:
560 $wgOut->showFileDeleteError( $this->img
->getName() );
564 # Image itself is now gone, and database is cleaned.
565 # Now we remove the image description page.
567 $article = new Article( $this->mTitle
);
568 $article->doDeleteArticle( $reason ); # ignore errors
570 $deleted = $this->img
->getName();
573 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
574 $wgOut->setRobotpolicy( 'noindex,nofollow' );
576 $loglink = '[[Special:Log/delete|' . wfMsg( 'deletionlog' ) . ']]';
577 $text = wfMsg( 'deletedtext', $deleted, $loglink );
579 $wgOut->addWikiText( $text );
581 $wgOut->returnToMain( false, $this->mTitle
->getPrefixedText() );
587 function doDeleteOldImage( $oldimage )
591 $ok = $this->img
->deleteOld( $oldimage, '' );
593 # If we actually have a file and can't delete it, throw an error.
594 # Something went awry...
595 $wgOut->showFileDeleteError( "$oldimage" );
598 $log = new LogPage( 'delete' );
599 $log->addEntry( 'delete', $this->mTitle
, wfMsg('deletedrevision',$oldimage) );
605 global $wgOut, $wgRequest, $wgUser;
607 $oldimage = $wgRequest->getText( 'oldimage' );
608 if ( strlen( $oldimage ) < 16 ) {
609 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
612 if ( strstr( $oldimage, "/" ) ||
strstr( $oldimage, "\\" ) ) {
613 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
617 if ( wfReadOnly() ) {
618 $wgOut->readOnlyPage();
621 if( $wgUser->isAnon() ) {
622 $wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' );
625 if ( ! $this->mTitle
->userCanEdit() ) {
626 $wgOut->readOnlyPage( $this->getContent(), true );
629 if ( $wgUser->isBlocked() ) {
630 return $this->blockedIPpage();
632 if( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
633 $wgOut->showErrorPage( 'internalerror', 'sessionfailure' );
636 $name = substr( $oldimage, 15 );
638 $dest = wfImageDir( $name );
639 $archive = wfImageArchiveDir( $name );
640 $curfile = "{$dest}/{$name}";
642 if ( !is_dir( $dest ) ) wfMkdirParents( $dest );
643 if ( !is_dir( $archive ) ) wfMkdirParents( $archive );
645 if ( ! is_file( $curfile ) ) {
646 $wgOut->showFileNotFoundError( htmlspecialchars( $curfile ) );
649 $oldver = wfTimestampNow() . "!{$name}";
651 if ( ! rename( $curfile, "${archive}/{$oldver}" ) ) {
652 $wgOut->showFileRenameError( $curfile, "${archive}/{$oldver}" );
655 if ( ! copy( "{$archive}/{$oldimage}", $curfile ) ) {
656 $wgOut->showFileCopyError( "${archive}/{$oldimage}", $curfile );
660 # Record upload and update metadata cache
661 $img = Image
::newFromName( $name );
662 $img->recordUpload( $oldver, wfMsg( "reverted" ) );
664 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
665 $wgOut->setRobotpolicy( 'noindex,nofollow' );
666 $wgOut->addHTML( wfMsg( 'imagereverted' ) );
668 $descTitle = $img->getTitle();
669 $wgOut->returnToMain( false, $descTitle->getPrefixedText() );
672 function blockedIPpage() {
673 $edit = new EditPage( $this );
674 return $edit->blockedIPpage();
678 * Override handling of action=purge
681 $this->img
= new Image( $this->mTitle
);
682 if( $this->img
->exists() ) {
683 wfDebug( "ImagePage::doPurge purging " . $this->img
->getName() . "\n" );
684 $update = new HTMLCacheUpdate( $this->mTitle
, 'imagelinks' );
686 $this->img
->purgeCache();
688 wfDebug( "ImagePage::doPurge no image\n" );
699 class ImageHistoryList
{
700 function ImageHistoryList( &$skin ) {
701 $this->skin
=& $skin;
704 function beginImageHistoryList() {
706 Xml
::element( 'h2', array( 'id' => 'filehistory' ), wfMsg( 'imghistory' ) ) .
707 "\n<p>" . wfMsg( 'imghistlegend' ) . "</p>\n".'<ul class="special">';
711 function endImageHistoryList() {
716 function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description, $width, $height ) {
717 global $wgUser, $wgLang, $wgTitle, $wgContLang;
719 $datetime = $wgLang->timeanddate( $timestamp, true );
720 $del = wfMsgHtml( 'deleteimg' );
721 $delall = wfMsgHtml( 'deleteimgcompletely' );
722 $cur = wfMsgHtml( 'cur' );
725 $url = Image
::imageUrl( $img );
727 if ( $wgUser->isAllowed('delete') ) {
728 $link = $wgTitle->escapeLocalURL( 'image=' . $wgTitle->getPartialURL() .
730 $style = $this->skin
->getInternalLinkAttributes( $link, $delall );
732 $dlink = '<a href="'.$link.'"'.$style.'>'.$delall.'</a>';
737 $url = htmlspecialchars( wfImageArchiveUrl( $img ) );
738 if( $wgUser->getID() != 0 && $wgTitle->userCanEdit() ) {
739 $token = urlencode( $wgUser->editToken( $img ) );
740 $rlink = $this->skin
->makeKnownLinkObj( $wgTitle,
741 wfMsgHtml( 'revertimg' ), 'action=revert&oldimage=' .
742 urlencode( $img ) . "&wpEditToken=$token" );
743 $dlink = $this->skin
->makeKnownLinkObj( $wgTitle,
744 $del, 'action=delete&oldimage=' . urlencode( $img ) .
745 "&wpEditToken=$token" );
747 # Having live active links for non-logged in users
748 # means that bots and spiders crawling our site can
749 # inadvertently change content. Baaaad idea.
750 $rlink = wfMsgHtml( 'revertimg' );
755 $userlink = $this->skin
->userLink( $user, $usertext ) . $this->skin
->userToolLinks( $user, $usertext );
756 $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
757 $wgLang->formatNum( $size ) );
758 $widthheight = wfMsgHtml( 'widthheight', $width, $height );
759 $style = $this->skin
->getInternalLinkAttributes( $url, $datetime );
761 $s = "<li> ({$dlink}) ({$rlink}) <a href=\"{$url}\"{$style}>{$datetime}</a> . . {$userlink} . . {$widthheight} ({$nbytes})";
763 $s .= $this->skin
->commentBlock( $description, $wgTitle );