5936541f373ab3e4e7fed2c2bab90600ec8b11ba
8 if( !defined( 'MEDIAWIKI' ) )
12 * Special handling for image description pages
14 class ImagePage
extends Article
{
16 /* private */ var $img; // Image object this page is shown for
17 var $mExtraDescription = false;
20 * Handler for action=render
21 * Include body text only; none of the image extras
25 $wgOut->setArticleBodyOnly( true );
26 $wgOut->addSecondaryWikitext( $this->getContent() );
30 global $wgOut, $wgShowEXIF, $wgRequest, $wgUser;
32 $this->img
= new Image( $this->mTitle
);
34 $diff = $wgRequest->getVal( 'diff' );
35 $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );
37 if ( $this->mTitle
->getNamespace() != NS_IMAGE ||
( isset( $diff ) && $diffOnly ) )
38 return Article
::view();
40 if ($wgShowEXIF && $this->img
->exists()) {
41 $exif = $this->img
->getExifData();
42 $showmeta = count($exif) ?
true : false;
48 if ($this->img
->exists())
49 $wgOut->addHTML($this->showTOC($showmeta));
51 $this->openShowImage();
53 # No need to display noarticletext, we use our own message, output in openShowImage()
54 if ( $this->getID() ) {
57 # Just need to set the right headers
58 $wgOut->setArticleFlag( true );
59 $wgOut->setRobotpolicy( 'index,follow' );
60 $wgOut->setPageTitle( $this->mTitle
->getPrefixedText() );
64 # Show shared description, if needed
65 if ( $this->mExtraDescription
) {
66 $fol = wfMsg( 'shareddescriptionfollows' );
68 $wgOut->addWikiText( $fol );
70 $wgOut->addHTML( '<div id="shared-image-desc">' . $this->mExtraDescription
. '</div>' );
73 $this->closeShowImage();
74 $this->imageHistory();
78 global $wgStylePath, $wgStyleVersion;
79 $expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) );
80 $collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) );
81 $wgOut->addHTML( Xml
::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ). "\n" );
82 $wgOut->addWikiText( $this->makeMetadataTable( $exif ) );
84 "<script type=\"text/javascript\" src=\"$wgStylePath/common/metadata.js?$wgStyleVersion\"></script>\n" .
85 "<script type=\"text/javascript\">attachMetadataToggle('mw_metadata', '$expand', '$collapse');</script>\n" );
94 * @param bool $metadata Whether or not to show the metadata link
97 function showTOC( $metadata ) {
99 $r = '<ul id="filetoc">
100 <li><a href="#file">' . $wgLang->getNsText( NS_IMAGE
) . '</a></li>
101 <li><a href="#filehistory">' . wfMsgHtml( 'imghistory' ) . '</a></li>
102 <li><a href="#filelinks">' . wfMsgHtml( 'imagelinks' ) . '</a></li>' .
103 ($metadata ?
'<li><a href="#metadata">' . wfMsgHtml( 'metadata' ) . '</a></li>' : '') . '
109 * Make a table with metadata to be shown in the output page.
113 * @param array $exif The array containing the EXIF data
116 function makeMetadataTable( $exif ) {
117 $r = wfMsg( 'metadata-help' ) . "\n\n";
118 $r .= "{| id=mw_metadata class=mw_metadata\n";
119 $visibleFields = $this->visibleMetadataFields();
120 foreach( $exif as $k => $v ) {
121 $tag = strtolower( $k );
122 $msg = wfMsg( "exif-$tag" );
123 $class = "exif-$tag";
124 if( !in_array( $tag, $visibleFields ) ) {
125 $class .= ' collapsable';
127 $r .= "|- class=\"$class\"\n";
136 * Get a list of EXIF metadata items which should be displayed when
137 * the metadata table is collapsed.
139 * @return array of strings
142 function visibleMetadataFields() {
144 $lines = explode( "\n", wfMsgForContent( 'metadata-fields' ) );
145 foreach( $lines as $line ) {
147 if( preg_match( '/^\\*\s*(.*?)\s*$/', $line, $matches ) ) {
148 $fields[] = $matches[1];
155 * Overloading Article's getContent method.
157 * Omit noarticletext if sharedupload; text will be fetched from the
158 * shared upload server if possible.
160 function getContent() {
161 if( $this->img
&& $this->img
->fromSharedDirectory
&& 0 == $this->getID() ) {
164 return Article
::getContent();
167 function openShowImage() {
168 global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang;
169 global $wgUseImageResize, $wgGenerateThumbnailOnParse;
171 $full_url = $this->img
->getURL();
174 $sizeSel = intval( $wgUser->getOption( 'imagesize') );
176 if( !isset( $wgImageLimits[$sizeSel] ) ) {
177 $sizeSel = User
::getDefaultOption( 'imagesize' );
179 $max = $wgImageLimits[$sizeSel];
181 $maxHeight = $max[1];
182 $sk = $wgUser->getSkin();
184 if ( $this->img
->exists() ) {
186 $page = $wgRequest->getIntOrNull( 'page' );
187 if ( ! is_null( $page ) ) {
188 $this->img
->selectPage( $page );
192 $width = $this->img
->getWidth();
193 $height = $this->img
->getHeight();
196 if ( $this->img
->allowInlineDisplay() and $width and $height) {
199 # "Download high res version" link below the image
200 $msg = wfMsgHtml('showbigimage', $width, $height, intval( $this->img
->getSize()/1024 ) );
202 # We'll show a thumbnail of this image
203 if ( $width > $maxWidth ||
$height > $maxHeight ) {
204 # Calculate the thumbnail size.
205 # First case, the limiting factor is the width, not the height.
206 if ( $width / $height >= $maxWidth / $maxHeight ) {
207 $height = round( $height * $maxWidth / $width);
209 # Note that $height <= $maxHeight now.
211 $newwidth = floor( $width * $maxHeight / $height);
212 $height = round( $height * $newwidth / $width );
214 # Note that $height <= $maxHeight now, but might not be identical
215 # because of rounding.
218 if( $wgUseImageResize ) {
219 $thumbnail = $this->img
->getThumbnail( $width, -1, $wgGenerateThumbnailOnParse );
220 if ( $thumbnail == null ) {
221 $url = $this->img
->getViewURL();
223 $url = $thumbnail->getURL();
226 # No resize ability? Show the full image, but scale
227 # it down in the browser so it fits on the page.
228 $url = $this->img
->getViewURL();
230 $anchoropen = "<a href=\"{$full_url}\">";
231 $anchorclose = "</a><br />";
232 if( $this->img
->mustRender() ) {
235 $anchorclose .= "\n$anchoropen{$msg}</a>";
238 $url = $this->img
->getViewURL();
242 if ( $this->img
->isMultipage() ) {
243 $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
246 $wgOut->addHTML( '<div class="fullImageLink" id="file">' . $anchoropen .
247 "<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" .
248 htmlspecialchars( $this->img
->getTitle()->getPrefixedText() ).'" />' . $anchorclose . '</div>' );
250 if ( $this->img
->isMultipage() ) {
251 $count = $this->img
->pageCount();
254 $label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false );
255 $link = $sk->makeLinkObj( $this->mTitle
, $label, 'page='. ($page-1) );
256 $this->img
->selectPage( $page - 1 );
257 $thumb1 = $sk->makeThumbLinkObj( $this->img
, $link, $label, 'none' );
262 if ( $page < $count ) {
263 $label = wfMsg( 'imgmultipagenext' );
264 $this->img
->selectPage( $page +
1 );
265 $link = $sk->makeLinkObj( $this->mTitle
, $label, 'page='. ($page+
1) );
266 $thumb2 = $sk->makeThumbLinkObj( $this->img
, $link, $label, 'none' );
271 $select = '<form name="pageselector" action="' . $this->img
->getEscapeLocalUrl( '' ) . '" method="GET" onchange="document.pageselector.submit();">' ;
272 $select .= $wgOut->parse( wfMsg( 'imgmultigotopre' ), false ) .
273 ' <select id="pageselector" name="page">';
274 for ( $i=1; $i <= $count; $i++
) {
275 $select .= Xml
::option( $wgLang->formatNum( $i ), $i,
278 $select .= '</select>' . $wgOut->parse( wfMsg( 'imgmultigotopost' ), false ) .
279 '<input type="submit" value="' .
280 htmlspecialchars( wfMsg( 'imgmultigo' ) ) . '"></form>';
282 $wgOut->addHTML( '</td><td><div class="multipageimagenavbox">' .
283 "$select<hr />$thumb1\n$thumb2<br clear=\"all\" /></div></td></tr></table>" );
286 #if direct link is allowed but it's not a renderable image, show an icon.
287 if ($this->img
->isSafeFile()) {
288 $icon= $this->img
->iconThumb();
290 $wgOut->addHTML( '<div class="fullImageLink" id="file"><a href="' . $full_url . '">' .
300 $filename = wfEscapeWikiText( $this->img
->getName() );
301 // Hacky workaround: for some reason we use the incorrect MIME type
302 // image/svg for SVG. This should be fixed internally, but at least
303 // make the displayed type right.
304 $mime = $this->img
->getMimeType();
305 if ($mime == 'image/svg') $mime = 'image/svg+xml';
307 $info = wfMsg( 'fileinfo',
308 ceil($this->img
->getSize()/1024.0),
312 $dirmark = $wgContLang->getDirMark();
313 if (!$this->img
->isSafeFile()) {
314 $warning = wfMsg( 'mediawarning' );
315 $wgOut->addWikiText( <<<END
316 <div class="fullMedia">
317 <span class="dangerousLink">[[Media:$filename|$filename]]</span>$dirmark
318 <span class="fileInfo"> ($info)</span>
321 <div class="mediaWarning">$warning</div>
325 $wgOut->addWikiText( <<<END
326 <div class="fullMedia">
327 [[Media:$filename|$filename]]$dirmark <span class="fileInfo"> ($info)</span>
334 if($this->img
->fromSharedDirectory
) {
335 $this->printSharedImageText();
338 # Image does not exist
340 $title = SpecialPage
::getTitleFor( 'Upload' );
341 $link = $sk->makeKnownLinkObj($title, wfMsgHtml('noimage-linktext'),
342 'wpDestFile=' . urlencode( $this->img
->getName() ) );
343 $wgOut->addHTML( wfMsgWikiHtml( 'noimage', $link ) );
347 function printSharedImageText() {
348 global $wgRepositoryBaseUrl, $wgFetchCommonsDescriptions, $wgOut, $wgUser;
350 $url = $wgRepositoryBaseUrl . urlencode($this->mTitle
->getDBkey());
351 $sharedtext = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml("sharedupload");
352 if ($wgRepositoryBaseUrl && !$wgFetchCommonsDescriptions) {
354 $sk = $wgUser->getSkin();
355 $title = SpecialPage
::getTitleFor( 'Upload' );
356 $link = $sk->makeKnownLinkObj($title, wfMsgHtml('shareduploadwiki-linktext'),
357 array( 'wpDestFile' => urlencode( $this->img
->getName() )));
358 $sharedtext .= " " . wfMsgWikiHtml('shareduploadwiki', $link);
360 $sharedtext .= "</div>";
361 $wgOut->addHTML($sharedtext);
363 if ($wgRepositoryBaseUrl && $wgFetchCommonsDescriptions) {
364 $text = Http
::get($url . '?action=render');
366 $this->mExtraDescription
= $text;
370 function getUploadUrl() {
372 $uploadTitle = SpecialPage
::getTitleFor( 'Upload' );
373 return $wgServer . $uploadTitle->getLocalUrl( 'wpDestFile=' . urlencode( $this->img
->getName() ) );
377 * Print out the various links at the bottom of the image page, e.g. reupload,
378 * external editing (and instructions link) etc.
380 function uploadLinksBox() {
381 global $wgUser, $wgOut;
383 if( $this->img
->fromSharedDirectory
)
386 $sk = $wgUser->getSkin();
388 $wgOut->addHtml( '<br /><ul>' );
390 # "Upload a new version of this file" link
391 if( $wgUser->isAllowed( 'reupload' ) ) {
392 $ulink = $sk->makeExternalLink( $this->getUploadUrl(), wfMsg( 'uploadnewversion-linktext' ) );
393 $wgOut->addHtml( "<li><div>{$ulink}</div></li>" );
396 # External editing link
397 $elink = $sk->makeKnownLinkObj( $this->mTitle
, wfMsgHtml( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
398 $wgOut->addHtml( '<li>' . $elink . '<div>' . wfMsgWikiHtml( 'edit-externally-help' ) . '</div></li>' );
400 $wgOut->addHtml( '</ul>' );
403 function closeShowImage()
410 * If the page we've just displayed is in the "Image" namespace,
411 * we follow it with an upload history of the image and its usage.
413 function imageHistory()
415 global $wgUser, $wgOut, $wgUseExternalEditor;
417 $sk = $wgUser->getSkin();
419 $line = $this->img
->nextHistoryLine();
422 $list = new ImageHistoryList( $sk );
423 $s = $list->beginImageHistoryList() .
424 $list->imageHistoryLine( true, wfTimestamp(TS_MW
, $line->img_timestamp
),
425 $this->mTitle
->getDBkey(), $line->img_user
,
426 $line->img_user_text
, $line->img_size
, $line->img_description
,
427 $line->img_width
, $line->img_height
430 while ( $line = $this->img
->nextHistoryLine() ) {
431 $s .= $list->imageHistoryLine( false, $line->img_timestamp
,
432 $line->oi_archive_name
, $line->img_user
,
433 $line->img_user_text
, $line->img_size
, $line->img_description
,
434 $line->img_width
, $line->img_height
437 $s .= $list->endImageHistoryList();
439 $wgOut->addHTML( $s );
441 # Exist check because we don't want to show this on pages where an image
442 # doesn't exist along with the noimage message, that would suck. -ævar
443 if( $wgUseExternalEditor && $this->img
->exists() ) {
444 $this->uploadLinksBox();
449 function imageLinks()
451 global $wgUser, $wgOut;
453 $wgOut->addHTML( Xml
::element( 'h2', array( 'id' => 'filelinks' ), wfMsg( 'imagelinks' ) ) . "\n" );
455 $dbr =& wfGetDB( DB_SLAVE
);
456 $page = $dbr->tableName( 'page' );
457 $imagelinks = $dbr->tableName( 'imagelinks' );
459 $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
460 $dbr->addQuotes( $this->mTitle
->getDBkey() ) . " AND il_from=page_id";
461 $sql = $dbr->limitResult($sql, 500, 0);
462 $res = $dbr->query( $sql, "ImagePage::imageLinks" );
464 if ( 0 == $dbr->numRows( $res ) ) {
465 $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
468 $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) . "</p>\n<ul>" );
470 $sk = $wgUser->getSkin();
471 while ( $s = $dbr->fetchObject( $res ) ) {
472 $name = Title
::MakeTitle( $s->page_namespace
, $s->page_title
);
473 $link = $sk->makeKnownLinkObj( $name, "" );
474 $wgOut->addHTML( "<li>{$link}</li>\n" );
476 $wgOut->addHTML( "</ul>\n" );
481 global $wgUser, $wgOut, $wgRequest;
483 $confirm = $wgRequest->wasPosted();
484 $reason = $wgRequest->getVal( 'wpReason' );
485 $image = $wgRequest->getVal( 'image' );
486 $oldimage = $wgRequest->getVal( 'oldimage' );
488 # Only sysops can delete images. Previously ordinary users could delete
489 # old revisions, but this is no longer the case.
490 if ( !$wgUser->isAllowed('delete') ) {
491 $wgOut->permissionRequired( 'delete' );
494 if ( $wgUser->isBlocked() ) {
495 return $this->blockedIPpage();
497 if ( wfReadOnly() ) {
498 $wgOut->readOnlyPage();
502 # Better double-check that it hasn't been deleted yet!
503 $wgOut->setPagetitle( wfMsg( 'confirmdelete' ) );
504 if ( ( !is_null( $image ) )
505 && ( '' == trim( $image ) ) ) {
506 $wgOut->showFatalError( wfMsg( 'cannotdelete' ) );
510 $this->img
= new Image( $this->mTitle
);
512 # Deleting old images doesn't require confirmation
513 if ( !is_null( $oldimage ) ||
$confirm ) {
514 if( $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
515 $this->doDelete( $reason );
517 $wgOut->showFatalError( wfMsg( 'sessionfailure' ) );
522 if ( !is_null( $image ) ) {
523 $q = '&image=' . urlencode( $image );
524 } else if ( !is_null( $oldimage ) ) {
525 $q = '&oldimage=' . urlencode( $oldimage );
529 return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) );
534 * @param $reason User provided reason for deletion.
536 function doDelete( $reason ) {
537 global $wgOut, $wgRequest;
539 $oldimage = $wgRequest->getVal( 'oldimage' );
541 if ( !is_null( $oldimage ) ) {
542 if ( strlen( $oldimage ) < 16 ) {
543 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
546 if ( strstr( $oldimage, "/" ) ||
strstr( $oldimage, "\\" ) ) {
547 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
550 if ( !$this->doDeleteOldImage( $oldimage ) ) {
553 $deleted = $oldimage;
555 $ok = $this->img
->delete( $reason );
557 # If the deletion operation actually failed, bug out:
558 $wgOut->showFileDeleteError( $this->img
->getName() );
562 # Image itself is now gone, and database is cleaned.
563 # Now we remove the image description page.
565 $article = new Article( $this->mTitle
);
566 $article->doDeleteArticle( $reason ); # ignore errors
568 $deleted = $this->img
->getName();
571 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
572 $wgOut->setRobotpolicy( 'noindex,nofollow' );
574 $loglink = '[[Special:Log/delete|' . wfMsg( 'deletionlog' ) . ']]';
575 $text = wfMsg( 'deletedtext', $deleted, $loglink );
577 $wgOut->addWikiText( $text );
579 $wgOut->returnToMain( false, $this->mTitle
->getPrefixedText() );
585 function doDeleteOldImage( $oldimage )
589 $ok = $this->img
->deleteOld( $oldimage, '' );
591 # If we actually have a file and can't delete it, throw an error.
592 # Something went awry...
593 $wgOut->showFileDeleteError( "$oldimage" );
596 $log = new LogPage( 'delete' );
597 $log->addEntry( 'delete', $this->mTitle
, wfMsg('deletedrevision',$oldimage) );
603 global $wgOut, $wgRequest, $wgUser;
605 $oldimage = $wgRequest->getText( 'oldimage' );
606 if ( strlen( $oldimage ) < 16 ) {
607 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
610 if ( strstr( $oldimage, "/" ) ||
strstr( $oldimage, "\\" ) ) {
611 $wgOut->showUnexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
615 if ( wfReadOnly() ) {
616 $wgOut->readOnlyPage();
619 if( $wgUser->isAnon() ) {
620 $wgOut->showErrorPage( 'uploadnologin', 'uploadnologintext' );
623 if ( ! $this->mTitle
->userCan( 'edit' ) ) {
624 $wgOut->readOnlyPage( $this->getContent(), true );
627 if ( $wgUser->isBlocked() ) {
628 return $this->blockedIPpage();
630 if( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
631 $wgOut->showErrorPage( 'internalerror', 'sessionfailure' );
634 $name = substr( $oldimage, 15 );
636 $dest = wfImageDir( $name );
637 $archive = wfImageArchiveDir( $name );
638 $curfile = "{$dest}/{$name}";
640 if ( !is_dir( $dest ) ) wfMkdirParents( $dest );
641 if ( !is_dir( $archive ) ) wfMkdirParents( $archive );
643 if ( ! is_file( $curfile ) ) {
644 $wgOut->showFileNotFoundError( htmlspecialchars( $curfile ) );
647 $oldver = wfTimestampNow() . "!{$name}";
649 if ( ! rename( $curfile, "${archive}/{$oldver}" ) ) {
650 $wgOut->showFileRenameError( $curfile, "${archive}/{$oldver}" );
653 if ( ! copy( "{$archive}/{$oldimage}", $curfile ) ) {
654 $wgOut->showFileCopyError( "${archive}/{$oldimage}", $curfile );
658 # Record upload and update metadata cache
659 $img = Image
::newFromName( $name );
660 $img->recordUpload( $oldver, wfMsg( "reverted" ) );
662 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
663 $wgOut->setRobotpolicy( 'noindex,nofollow' );
664 $wgOut->addHTML( wfMsg( 'imagereverted' ) );
666 $descTitle = $img->getTitle();
667 $wgOut->returnToMain( false, $descTitle->getPrefixedText() );
670 function blockedIPpage() {
671 $edit = new EditPage( $this );
672 return $edit->blockedIPpage();
676 * Override handling of action=purge
679 $this->img
= new Image( $this->mTitle
);
680 if( $this->img
->exists() ) {
681 wfDebug( "ImagePage::doPurge purging " . $this->img
->getName() . "\n" );
682 $update = new HTMLCacheUpdate( $this->mTitle
, 'imagelinks' );
684 $this->img
->purgeCache();
686 wfDebug( "ImagePage::doPurge no image\n" );
696 class ImageHistoryList
{
697 function ImageHistoryList( &$skin ) {
698 $this->skin
=& $skin;
701 function beginImageHistoryList() {
703 Xml
::element( 'h2', array( 'id' => 'filehistory' ), wfMsg( 'imghistory' ) ) .
704 "\n<p>" . wfMsg( 'imghistlegend' ) . "</p>\n".'<ul class="special">';
708 function endImageHistoryList() {
713 function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description, $width, $height ) {
714 global $wgUser, $wgLang, $wgTitle, $wgContLang;
716 $datetime = $wgLang->timeanddate( $timestamp, true );
717 $del = wfMsgHtml( 'deleteimg' );
718 $delall = wfMsgHtml( 'deleteimgcompletely' );
719 $cur = wfMsgHtml( 'cur' );
722 $url = Image
::imageUrl( $img );
724 if ( $wgUser->isAllowed('delete') ) {
725 $link = $wgTitle->escapeLocalURL( 'image=' . $wgTitle->getPartialURL() .
727 $style = $this->skin
->getInternalLinkAttributes( $link, $delall );
729 $dlink = '<a href="'.$link.'"'.$style.'>'.$delall.'</a>';
734 $url = htmlspecialchars( wfImageArchiveUrl( $img ) );
735 if( $wgUser->getID() != 0 && $wgTitle->userCan( 'edit' ) ) {
736 $token = urlencode( $wgUser->editToken( $img ) );
737 $rlink = $this->skin
->makeKnownLinkObj( $wgTitle,
738 wfMsgHtml( 'revertimg' ), 'action=revert&oldimage=' .
739 urlencode( $img ) . "&wpEditToken=$token" );
740 $dlink = $this->skin
->makeKnownLinkObj( $wgTitle,
741 $del, 'action=delete&oldimage=' . urlencode( $img ) .
742 "&wpEditToken=$token" );
744 # Having live active links for non-logged in users
745 # means that bots and spiders crawling our site can
746 # inadvertently change content. Baaaad idea.
747 $rlink = wfMsgHtml( 'revertimg' );
752 $userlink = $this->skin
->userLink( $user, $usertext ) . $this->skin
->userToolLinks( $user, $usertext );
753 $nbytes = wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ),
754 $wgLang->formatNum( $size ) );
755 $widthheight = wfMsgHtml( 'widthheight', $width, $height );
756 $style = $this->skin
->getInternalLinkAttributes( $url, $datetime );
758 $s = "<li> ({$dlink}) ({$rlink}) <a href=\"{$url}\"{$style}>{$datetime}</a> . . {$userlink} . . {$widthheight} ({$nbytes})";
760 $s .= $this->skin
->commentBlock( $description, $wgTitle );