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;
34 $this->img
= new Image( $this->mTitle
);
36 if( $this->mTitle
->getNamespace() == NS_IMAGE
) {
37 if ($wgShowEXIF && $this->img
->exists()) {
38 $exif = $this->img
->getExifData();
39 $showmeta = count($exif) ?
true : false;
45 if ($this->img
->exists())
46 $wgOut->addHTML($this->showTOC($showmeta));
48 $this->openShowImage();
50 # No need to display noarticletext, we use our own message, output in openShowImage()
51 if( $this->getID() ) {
54 # Just need to set the right headers
55 $wgOut->setArticleFlag( true );
56 $wgOut->setRobotpolicy( 'index,follow' );
57 $wgOut->setPageTitle( $this->mTitle
->getPrefixedText() );
61 # Show shared description, if needed
62 if( $this->mExtraDescription
) {
63 $fol = wfMsg( 'shareddescriptionfollows' );
65 $wgOut->addWikiText( $fol );
67 $wgOut->addHTML( '<div id="shared-image-desc">' . $this->mExtraDescription
. '</div>' );
70 $this->closeShowImage();
71 $this->imageHistory();
74 global $wgStylePath, $wgStyleVersion;
75 $expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) );
76 $collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) );
77 $wgOut->addHTML( "<h2 id=\"metadata\">" . wfMsgHtml( 'metadata' ) . "</h2>\n" );
78 $wgOut->addWikiText( $this->makeMetadataTable( $exif ) );
80 "<script type=\"text/javascript\" src=\"$wgStylePath/common/metadata.js?$wgStyleVersion\"></script>\n" .
81 "<script type=\"text/javascript\">attachMetadataToggle('mw_metadata', '$expand', '$collapse');</script>\n" );
93 * @param bool $metadata Whether or not to show the metadata link
96 function showTOC( $metadata ) {
98 $r = '<ul id="filetoc">
99 <li><a href="#file">' . $wgLang->getNsText( NS_IMAGE
) . '</a></li>
100 <li><a href="#filehistory">' . wfMsgHtml( 'imghistory' ) . '</a></li>
101 <li><a href="#filelinks">' . wfMsgHtml( 'imagelinks' ) . '</a></li>' .
102 ($metadata ?
'<li><a href="#metadata">' . wfMsgHtml( 'metadata' ) . '</a></li>' : '') . '
108 * Make a table with metadata to be shown in the output page.
112 * @param array $exif The array containing the EXIF data
115 function makeMetadataTable( $exif ) {
116 $r = wfMsg( 'metadata-help' ) . "\n\n";
117 $r .= "{| id=mw_metadata class=mw_metadata\n";
118 $visibleFields = $this->visibleMetadataFields();
119 foreach( $exif as $k => $v ) {
120 $tag = strtolower( $k );
121 $msg = wfMsg( "exif-$tag" );
122 $class = "exif-$tag";
123 if( !in_array( $tag, $visibleFields ) ) {
124 $class .= ' collapsable';
126 $r .= "|- class=\"$class\"\n";
135 * Get a list of EXIF metadata items which should be displayed when
136 * the metadata table is collapsed.
138 * @return array of strings
141 function visibleMetadataFields() {
143 $lines = explode( "\n", wfMsgForContent( 'metadata-fields' ) );
144 foreach( $lines as $line ) {
146 if( preg_match( '/^\\*\s*(.*?)\s*$/', $line, $matches ) ) {
147 $fields[] = $matches[1];
154 * Overloading Article's getContent method.
156 * Omit noarticletext if sharedupload; text will be fetched from the
157 * shared upload server if possible.
159 function getContent() {
160 if( $this->img
&& $this->img
->fromSharedDirectory
&& 0 == $this->getID() ) {
163 return Article
::getContent();
166 function openShowImage() {
167 global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang;
168 global $wgUseImageResize, $wgGenerateThumbnailOnParse;
170 $full_url = $this->img
->getURL();
174 if( $wgUser->getOption( 'imagesize' ) == '' ) {
175 $sizeSel = User
::getDefaultOption( 'imagesize' );
177 $sizeSel = intval( $wgUser->getOption( 'imagesize' ) );
179 if( !isset( $wgImageLimits[$sizeSel] ) ) {
180 $sizeSel = User
::getDefaultOption( 'imagesize' );
182 $max = $wgImageLimits[$sizeSel];
184 $maxHeight = $max[1];
185 $sk = $wgUser->getSkin();
187 if ( $this->img
->exists() ) {
189 $page = $wgRequest->getIntOrNull( 'page' );
190 if ( ! is_null( $page ) ) {
191 $this->img
->selectPage( $page );
195 $width = $this->img
->getWidth();
196 $height = $this->img
->getHeight();
199 if ( $this->img
->allowInlineDisplay() and $width and $height) {
202 # "Download high res version" link below the image
203 $msg = wfMsgHtml('showbigimage', $width, $height, intval( $this->img
->getSize()/1024 ) );
205 # We'll show a thumbnail of this image
206 if ( $width > $maxWidth ||
$height > $maxHeight ) {
207 # Calculate the thumbnail size.
208 # First case, the limiting factor is the width, not the height.
209 if ( $width / $height >= $maxWidth / $maxHeight ) {
210 $height = round( $height * $maxWidth / $width);
212 # Note that $height <= $maxHeight now.
214 $newwidth = floor( $width * $maxHeight / $height);
215 $height = round( $height * $newwidth / $width );
217 # Note that $height <= $maxHeight now, but might not be identical
218 # because of rounding.
221 if( $wgUseImageResize ) {
222 $thumbnail = $this->img
->getThumbnail( $width, -1, $wgGenerateThumbnailOnParse );
223 if ( $thumbnail == null ) {
224 $url = $this->img
->getViewURL();
226 $url = $thumbnail->getURL();
229 # No resize ability? Show the full image, but scale
230 # it down in the browser so it fits on the page.
231 $url = $this->img
->getViewURL();
233 $anchoropen = "<a href=\"{$full_url}\">";
234 $anchorclose = "</a><br />";
235 if( $this->img
->mustRender() ) {
238 $anchorclose .= "\n$anchoropen{$msg}</a>";
241 $url = $this->img
->getViewURL();
245 if ( $this->img
->isMultipage() ) {
246 $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
249 $wgOut->addHTML( '<div class="fullImageLink" id="file">' . $anchoropen .
250 "<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" .
251 htmlspecialchars( $wgRequest->getVal( 'image' ) ).'" />' . $anchorclose . '</div>' );
253 if ( $this->img
->isMultipage() ) {
254 $count = $this->img
->pageCount();
257 $label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false );
258 $link = $sk->makeLinkObj( $this->mTitle
, $label, 'page='. ($page-1) );
259 $this->img
->selectPage( $page - 1 );
260 $thumb1 = $sk->makeThumbLinkObj( $this->img
, $link, $label, 'none' );
265 if ( $page < $count ) {
266 $label = wfMsg( 'imgmultipagenext' );
267 $this->img
->selectPage( $page +
1 );
268 $link = $sk->makeLinkObj( $this->mTitle
, $label, 'page='. ($page+
1) );
269 $thumb2 = $sk->makeThumbLinkObj( $this->img
, $link, $label, 'none' );
274 $select = '<form name="pageselector" action="' . $this->img
->getEscapeLocalUrl( '' ) . '" method="GET" onchange="document.pageselector.submit();">' ;
275 $select .= $wgOut->parse( wfMsg( 'imgmultigotopre' ), false ) .
276 ' <select id="pageselector" name="page">';
277 for ( $i=1; $i <= $count; $i++
) {
278 $select .= Xml
::option( $wgLang->formatNum( $i ), $i,
281 $select .= '</select>' . $wgOut->parse( wfMsg( 'imgmultigotopost' ), false ) .
282 '<input type="submit" value="' .
283 htmlspecialchars( wfMsg( 'imgmultigo' ) ) . '"></form>';
285 $wgOut->addHTML( '</td><td><div class="multipageimagenavbox">' .
286 "$select<hr />$thumb1\n$thumb2<br clear=\"all\" /></div></td></tr></table>" );
289 #if direct link is allowed but it's not a renderable image, show an icon.
290 if ($this->img
->isSafeFile()) {
291 $icon= $this->img
->iconThumb();
293 $wgOut->addHTML( '<div class="fullImageLink" id="file"><a href="' . $full_url . '">' .
303 $filename = wfEscapeWikiText( $this->img
->getName() );
304 // Hacky workaround: for some reason we use the incorrect MIME type
305 // image/svg for SVG. This should be fixed internally, but at least
306 // make the displayed type right.
307 $mime = $this->img
->getMimeType();
308 if ($mime == 'image/svg') $mime = 'image/svg+xml';
310 $info = wfMsg( 'fileinfo',
311 ceil($this->img
->getSize()/1024.0),
315 $dirmark = $wgContLang->getDirMark();
316 if (!$this->img
->isSafeFile()) {
317 $warning = wfMsg( 'mediawarning' );
318 $wgOut->addWikiText( <<<END
319 <div class="fullMedia">
320 <span class="dangerousLink">[[Media:$filename|$filename]]</span>$dirmark
321 <span class="fileInfo"> ($info)</span>
324 <div class="mediaWarning">$warning</div>
328 $wgOut->addWikiText( <<<END
329 <div class="fullMedia">
330 [[Media:$filename|$filename]]$dirmark <span class="fileInfo"> ($info)</span>
337 if($this->img
->fromSharedDirectory
) {
338 $this->printSharedImageText();
341 # Image does not exist
343 $title = SpecialPage
::getTitleFor( 'Upload' );
344 $link = $sk->makeKnownLinkObj($title, wfMsgHtml('noimage-linktext'),
345 'wpDestFile=' . urlencode( $this->img
->getName() ) );
346 $wgOut->addHTML( wfMsgWikiHtml( 'noimage', $link ) );
350 function printSharedImageText() {
351 global $wgRepositoryBaseUrl, $wgFetchCommonsDescriptions, $wgOut, $wgUser;
353 $url = $wgRepositoryBaseUrl . urlencode($this->mTitle
->getDBkey());
354 $sharedtext = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml("sharedupload");
355 if ($wgRepositoryBaseUrl && !$wgFetchCommonsDescriptions) {
357 $sk = $wgUser->getSkin();
358 $title = SpecialPage
::getTitleFor( 'Upload' );
359 $link = $sk->makeKnownLinkObj($title, wfMsgHtml('shareduploadwiki-linktext'),
360 array( 'wpDestFile' => urlencode( $this->img
->getName() )));
361 $sharedtext .= " " . wfMsgWikiHtml('shareduploadwiki', $link);
363 $sharedtext .= "</div>";
364 $wgOut->addHTML($sharedtext);
366 if ($wgRepositoryBaseUrl && $wgFetchCommonsDescriptions) {
367 $text = Http
::get($url . '?action=render');
369 $this->mExtraDescription
= $text;
373 function getUploadUrl() {
375 $uploadTitle = SpecialPage
::getTitleFor( 'Upload' );
376 return $wgServer . $uploadTitle->getLocalUrl( 'wpDestFile=' . urlencode( $this->img
->getName() ) );
380 * Print out the various links at the bottom of the image page, e.g. reupload,
381 * external editing (and instructions link) etc.
383 function uploadLinksBox() {
384 global $wgUser, $wgOut;
386 if( $this->img
->fromSharedDirectory
)
389 $sk = $wgUser->getSkin();
391 $wgOut->addHtml( '<br /><ul>' );
393 # "Upload a new version of this file" link
394 if( $wgUser->isAllowed( 'reupload' ) ) {
395 $ulink = $sk->makeExternalLink( $this->getUploadUrl(), wfMsg( 'uploadnewversion-linktext' ) );
396 $wgOut->addHtml( "<li><div>{$ulink}</div></li>" );
399 # External editing link
400 $elink = $sk->makeKnownLinkObj( $this->mTitle
, wfMsg( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
401 $wgOut->addHtml( '<li>' . $elink . '<div>' . wfMsgWikiHtml( 'edit-externally-help' ) . '</div></li>' );
403 $wgOut->addHtml( '</ul>' );
406 function closeShowImage()
413 * If the page we've just displayed is in the "Image" namespace,
414 * we follow it with an upload history of the image and its usage.
416 function imageHistory()
418 global $wgUser, $wgOut, $wgUseExternalEditor;
420 $sk = $wgUser->getSkin();
422 $line = $this->img
->nextHistoryLine();
425 $list = new ImageHistoryList( $sk );
426 $s = $list->beginImageHistoryList() .
427 $list->imageHistoryLine( true, wfTimestamp(TS_MW
, $line->img_timestamp
),
428 $this->mTitle
->getDBkey(), $line->img_user
,
429 $line->img_user_text
, $line->img_size
, $line->img_description
,
430 $line->img_width
, $line->img_height
433 while ( $line = $this->img
->nextHistoryLine() ) {
434 $s .= $list->imageHistoryLine( false, $line->img_timestamp
,
435 $line->oi_archive_name
, $line->img_user
,
436 $line->img_user_text
, $line->img_size
, $line->img_description
,
437 $line->img_width
, $line->img_height
440 $s .= $list->endImageHistoryList();
442 $wgOut->addHTML( $s );
444 # Exist check because we don't want to show this on pages where an image
445 # doesn't exist along with the noimage message, that would suck. -ævar
446 if( $wgUseExternalEditor && $this->img
->exists() ) {
447 $this->uploadLinksBox();
452 function imageLinks()
454 global $wgUser, $wgOut;
456 $wgOut->addHTML( '<h2 id="filelinks">' . wfMsg( 'imagelinks' ) . "</h2>\n" );
458 $dbr =& wfGetDB( DB_SLAVE
);
459 $page = $dbr->tableName( 'page' );
460 $imagelinks = $dbr->tableName( 'imagelinks' );
462 $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
463 $dbr->addQuotes( $this->mTitle
->getDBkey() ) . " AND il_from=page_id";
464 $sql = $dbr->limitResult($sql, 500, 0);
465 $res = $dbr->query( $sql, "ImagePage::imageLinks" );
467 if ( 0 == $dbr->numRows( $res ) ) {
468 $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
471 $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) . "</p>\n<ul>" );
473 $sk = $wgUser->getSkin();
474 while ( $s = $dbr->fetchObject( $res ) ) {
475 $name = Title
::MakeTitle( $s->page_namespace
, $s->page_title
);
476 $link = $sk->makeKnownLinkObj( $name, "" );
477 $wgOut->addHTML( "<li>{$link}</li>\n" );
479 $wgOut->addHTML( "</ul>\n" );
484 global $wgUser, $wgOut, $wgRequest;
486 $confirm = $wgRequest->wasPosted();
487 $reason = $wgRequest->getVal( 'wpReason' );
488 $image = $wgRequest->getVal( 'image' );
489 $oldimage = $wgRequest->getVal( 'oldimage' );
491 # Only sysops can delete images. Previously ordinary users could delete
492 # old revisions, but this is no longer the case.
493 if ( !$wgUser->isAllowed('delete') ) {
494 $wgOut->permissionRequired( 'delete' );
497 if ( $wgUser->isBlocked() ) {
498 return $this->blockedIPpage();
500 if ( wfReadOnly() ) {
501 $wgOut->readOnlyPage();
505 # Better double-check that it hasn't been deleted yet!
506 $wgOut->setPagetitle( wfMsg( 'confirmdelete' ) );
507 if ( ( !is_null( $image ) )
508 && ( '' == trim( $image ) ) ) {
509 $wgOut->showFatalError( wfMsg( 'cannotdelete' ) );
513 $this->img
= new Image( $this->mTitle
);
515 # Deleting old images doesn't require confirmation
516 if ( !is_null( $oldimage ) ||
$confirm ) {
517 if( $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
518 $this->doDelete( $reason );
520 $wgOut->showFatalError( wfMsg( 'sessionfailure' ) );
525 if ( !is_null( $image ) ) {
526 $q = '&image=' . urlencode( $image );
527 } else if ( !is_null( $oldimage ) ) {
528 $q = '&oldimage=' . urlencode( $oldimage );
532 return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) );
537 * @param $reason User provided reason for deletion.
539 function doDelete( $reason ) {
540 global $wgOut, $wgRequest;
542 $oldimage = $wgRequest->getVal( 'oldimage' );
544 if ( !is_null( $oldimage ) ) {
545 if ( strlen( $oldimage ) < 16 ) {
546 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
549 if ( strstr( $oldimage, "/" ) ||
strstr( $oldimage, "\\" ) ) {
550 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
553 if ( !$this->doDeleteOldImage( $oldimage ) ) {
556 $deleted = $oldimage;
558 $ok = $this->img
->delete( $reason );
560 # If the deletion operation actually failed, bug out:
561 $wgOut->showFileDeleteError( $this->img
->getName() );
565 # Image itself is now gone, and database is cleaned.
566 # Now we remove the image description page.
568 $article = new Article( $this->mTitle
);
569 $article->doDeleteArticle( $reason ); # ignore errors
571 $deleted = $this->img
->getName();
574 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
575 $wgOut->setRobotpolicy( 'noindex,nofollow' );
577 $loglink = '[[Special:Log/delete|' . wfMsg( 'deletionlog' ) . ']]';
578 $text = wfMsg( 'deletedtext', $deleted, $loglink );
580 $wgOut->addWikiText( $text );
582 $wgOut->returnToMain( false, $this->mTitle
->getPrefixedText() );
588 function doDeleteOldImage( $oldimage )
592 $ok = $this->img
->deleteOld( $oldimage, '' );
594 # If we actually have a file and can't delete it, throw an error.
595 # Something went awry...
596 $wgOut->showFileDeleteError( "$oldimage" );
599 $log = new LogPage( 'delete' );
600 $log->addEntry( 'delete', $this->mTitle
, wfMsg('deletedrevision',$oldimage) );
606 global $wgOut, $wgRequest, $wgUser;
608 $oldimage = $wgRequest->getText( 'oldimage' );
609 if ( strlen( $oldimage ) < 16 ) {
610 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
613 if ( strstr( $oldimage, "/" ) ||
strstr( $oldimage, "\\" ) ) {
614 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
618 if ( wfReadOnly() ) {
619 $wgOut->readOnlyPage();
622 if( $wgUser->isAnon() ) {
623 $wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' );
626 if ( ! $this->mTitle
->userCanEdit() ) {
627 $wgOut->readOnlyPage( $this->getContent(), true );
630 if ( $wgUser->isBlocked() ) {
631 return $this->blockedIPpage();
633 if( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
634 $wgOut->showErrorPage( 'internalerror', 'sessionfailure' );
637 $name = substr( $oldimage, 15 );
639 $dest = wfImageDir( $name );
640 $archive = wfImageArchiveDir( $name );
641 $curfile = "{$dest}/{$name}";
643 if ( !is_dir( $dest ) ) wfMkdirParents( $dest );
644 if ( !is_dir( $archive ) ) wfMkdirParents( $archive );
646 if ( ! is_file( $curfile ) ) {
647 $wgOut->showFileNotFoundError( htmlspecialchars( $curfile ) );
650 $oldver = wfTimestampNow() . "!{$name}";
652 $dbr =& wfGetDB( DB_SLAVE
);
653 $size = $dbr->selectField( 'oldimage', 'oi_size', array( 'oi_archive_name' => $oldimage ) );
655 if ( ! rename( $curfile, "${archive}/{$oldver}" ) ) {
656 $wgOut->showFileRenameError( $curfile, "${archive}/{$oldver}" );
659 if ( ! copy( "{$archive}/{$oldimage}", $curfile ) ) {
660 $wgOut->showFileCopyError( "${archive}/{$oldimage}", $curfile );
664 # Record upload and update metadata cache
665 $img = Image
::newFromName( $name );
666 $img->recordUpload( $oldver, wfMsg( "reverted" ) );
668 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
669 $wgOut->setRobotpolicy( 'noindex,nofollow' );
670 $wgOut->addHTML( wfMsg( 'imagereverted' ) );
672 $descTitle = $img->getTitle();
673 $wgOut->returnToMain( false, $descTitle->getPrefixedText() );
676 function blockedIPpage() {
677 $edit = new EditPage( $this );
678 return $edit->blockedIPpage();
682 * Override handling of action=purge
685 $this->img
= new Image( $this->mTitle
);
686 if( $this->img
->exists() ) {
687 wfDebug( "ImagePage::doPurge purging " . $this->img
->getName() . "\n" );
688 $update = new HTMLCacheUpdate( $this->mTitle
, 'imagelinks' );
690 $this->img
->purgeCache();
692 wfDebug( "ImagePage::doPurge no image\n" );
703 class ImageHistoryList
{
704 function ImageHistoryList( &$skin ) {
705 $this->skin
=& $skin;
708 function beginImageHistoryList() {
709 $s = "\n<h2 id=\"filehistory\">" . wfMsg( 'imghistory' ) . "</h2>\n" .
710 "<p>" . wfMsg( 'imghistlegend' ) . "</p>\n".'<ul class="special">';
714 function endImageHistoryList() {
719 function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description, $width, $height ) {
720 global $wgUser, $wgLang, $wgTitle, $wgContLang;
722 $datetime = $wgLang->timeanddate( $timestamp, true );
723 $del = wfMsg( 'deleteimg' );
724 $delall = wfMsg( 'deleteimgcompletely' );
725 $cur = wfMsg( 'cur' );
728 $url = Image
::imageUrl( $img );
730 if ( $wgUser->isAllowed('delete') ) {
731 $link = $wgTitle->escapeLocalURL( 'image=' . $wgTitle->getPartialURL() .
733 $style = $this->skin
->getInternalLinkAttributes( $link, $delall );
735 $dlink = '<a href="'.$link.'"'.$style.'>'.$delall.'</a>';
740 $url = htmlspecialchars( wfImageArchiveUrl( $img ) );
741 if( $wgUser->getID() != 0 && $wgTitle->userCanEdit() ) {
742 $token = urlencode( $wgUser->editToken( $img ) );
743 $rlink = $this->skin
->makeKnownLinkObj( $wgTitle,
744 wfMsg( 'revertimg' ), 'action=revert&oldimage=' .
745 urlencode( $img ) . "&wpEditToken=$token" );
746 $dlink = $this->skin
->makeKnownLinkObj( $wgTitle,
747 $del, 'action=delete&oldimage=' . urlencode( $img ) .
748 "&wpEditToken=$token" );
750 # Having live active links for non-logged in users
751 # means that bots and spiders crawling our site can
752 # inadvertently change content. Baaaad idea.
753 $rlink = wfMsg( 'revertimg' );
758 $userlink = $this->skin
->userLink( $user, $usertext ) . $this->skin
->userToolLinks( $user, $usertext );
759 $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
760 $wgLang->formatNum( $size ) );
761 $widthheight = wfMsg( 'widthheight', $width, $height );
762 $style = $this->skin
->getInternalLinkAttributes( $url, $datetime );
764 $s = "<li> ({$dlink}) ({$rlink}) <a href=\"{$url}\"{$style}>{$datetime}</a> . . {$userlink} . . {$widthheight} ({$nbytes})";
766 $s .= $this->skin
->commentBlock( $description, $wgTitle );