* (bug 2488) Format 'deletedtext' message as wikitext
[lhc/web/wiklou.git] / includes / ImagePage.php
1 <?php
2 /**
3 * @package MediaWiki
4 */
5
6 /**
7 *
8 */
9 if( !defined( 'MEDIAWIKI' ) )
10 die();
11
12 require_once( 'Image.php' );
13
14 /**
15 * Special handling for image description pages
16 * @package MediaWiki
17 */
18 class ImagePage extends Article {
19
20 /* private */ var $img; // Image object this page is shown for
21
22 function view() {
23 global $wgUseExternalEditor, $wgOut, $wgShowEXIF;
24
25 $this->img = new Image( $this->mTitle );
26
27 if( $this->mTitle->getNamespace() == NS_IMAGE ) {
28 if ($wgShowEXIF && $this->img->exists()) {
29 $exif = $this->img->getExifData();
30 $showmeta = count($exif) ? true : false;
31 } else {
32 $exif = false;
33 $showmeta = false;
34 }
35
36 if ($this->img->exists())
37 $wgOut->addHTML($this->showTOC($showmeta));
38
39 $this->openShowImage();
40 if ($exif)
41 $wgOut->addWikiText($this->makeMetadataTable($exif));
42
43 # No need to display noarticletext, we use our own message, output in openShowImage()
44 if( $this->getID() ) {
45 Article::view();
46 } else {
47 # Just need to set the right headers
48 $wgOut->setArticleFlag( true );
49 $wgOut->setRobotpolicy( 'index,follow' );
50 $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
51 $wgOut->addMetaTags();
52 $this->viewUpdates();
53 }
54
55 $this->closeShowImage();
56 $this->imageHistory();
57 $this->imageLinks();
58 } else {
59 Article::view();
60 }
61 }
62
63 /**
64 * Create the TOC
65 *
66 * @access private
67 *
68 * @param bool $metadata Whether or not to show the metadata link
69 * @return string
70 */
71 function showTOC( $metadata ) {
72 global $wgLang;
73 $r = '<ul id="filetoc">
74 <li><a href="#file">' . $wgLang->getNsText( NS_IMAGE ) . '</a></li>' .
75 ($metadata ? '<li><a href="#metadata">' . wfMsg( 'metadata' ) . '</a></li>' : '') . '
76 <li><a href="#filehistory">' . wfMsg( 'imghistory' ) . '</a></li>
77 <li><a href="#filelinks">' . wfMsg( 'imagelinks' ) . '</a></li>
78 </ul>';
79 return $r;
80 }
81
82 /**
83 * Make a table with metadata to be shown in the output page.
84 *
85 * @access private
86 *
87 * @param array $exif The array containing the EXIF data
88 * @return string
89 */
90 function makeMetadataTable( $exif ) {
91 $r = "{| class=metadata align=right width=250px\n";
92 $r .= '|+ id=metadata | '. htmlspecialchars( wfMsg( 'metadata' ) ) . "\n";
93 foreach( $exif as $k => $v ) {
94 $tag = strtolower( $k );
95 $r .= "! class=$tag |" . wfMsg( "exif-$tag" ) . "\n";
96 $r .= "| class=$tag |" . htmlspecialchars( $v ) . "\n";
97 $r .= "|-\n";
98 }
99 return substr($r, 0, -3) . '|}';
100 }
101
102 /**
103 * Overloading Article's getContent method.
104 * Omit noarticletext if sharedupload
105 *
106 * @param $noredir If true, do not follow redirects
107 */
108 function getContent( $noredir )
109 {
110 if ( $this->img && $this->img->fromSharedDirectory && 0 == $this->getID() ) {
111 return '';
112 }
113 return Article::getContent( $noredir );
114 }
115
116 function openShowImage()
117 {
118 global $wgOut, $wgUser, $wgImageLimits, $wgRequest,
119 $wgUseImageResize, $wgRepositoryBaseUrl,
120 $wgUseExternalEditor, $wgServer;
121 $full_url = $this->img->getViewURL();
122 $anchoropen = '';
123 $anchorclose = '';
124
125 if( $wgUser->getOption( 'imagesize' ) == '' ) {
126 $sizeSel = User::getDefaultOption( 'imagesize' );
127 } else {
128 $sizeSel = IntVal( $wgUser->getOption( 'imagesize' ) );
129 }
130 if( !isset( $wgImageLimits[$sizeSel] ) ) {
131 $sizeSel = User::getDefaultOption( 'imagesize' );
132 }
133 $max = $wgImageLimits[$sizeSel];
134 $maxWidth = $max[0];
135 $maxHeight = $max[1];
136 $sk = $wgUser->getSkin();
137
138 if ( $this->img->exists() ) {
139 # image
140 $width = $this->img->getWidth();
141 $height = $this->img->getHeight();
142 $showLink = false;
143
144 if ( $this->img->allowInlineDisplay() and $width and $height) {
145 # image
146
147 # "Download high res version" link below the image
148 $msg = wfMsg('showbigimage', $width, $height, intval( $this->img->getSize()/1024 ) );
149 if ( $width > $maxWidth ) {
150 $height = floor( $height * $maxWidth / $width );
151 $width = $maxWidth;
152 }
153 if ( $height > $maxHeight ) {
154 $width = floor( $width * $maxHeight / $height );
155 $height = $maxHeight;
156 }
157 if ( !$this->img->mustRender()
158 && ( $width != $this->img->getWidth() || $height != $this->img->getHeight() ) ) {
159 if( $wgUseImageResize ) {
160 $thumbnail = $this->img->getThumbnail( $width );
161 if ( $thumbnail == null ) {
162 $url = $full_url;
163 } else {
164 $url = $thumbnail->getUrl();
165 }
166 } else {
167 # No resize ability? Show the full image, but scale
168 # it down in the browser so it fits on the page.
169 $url = $full_url;
170 }
171 $anchoropen = "<a href=\"{$full_url}\">";
172 $anchorclose = "</a><br />\n$anchoropen{$msg}</a>";
173 } else {
174 $url = $full_url;
175 $showLink = $this->img->mustRender();
176 }
177 $wgOut->addHTML( '<div class="fullImageLink" id="file">' . $anchoropen .
178 "<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" .
179 htmlspecialchars( $wgRequest->getVal( 'image' ) ).'" />' . $anchorclose . '</div>' );
180 } else {
181 #if direct link is allowed but it's not a renderable image, show an icon.
182 if ($this->img->isSafeFile()) {
183 $icon= $this->img->iconThumb();
184
185 $wgOut->addHTML( '<div class="fullImageLink" id="file"><a href="' . $full_url . '">' .
186 $icon->toHtml() .
187 '</a></div>' );
188 }
189
190 $showLink = true;
191 }
192
193
194 if ($showLink) {
195 $s= $sk->makeMediaLink( $this->img->getName(), '', '', true );
196 $info= wfMsg( 'fileinfo', ceil($this->img->getSize()/1024.0), $this->img->getMimeType() );
197
198 if (!$this->img->isSafeFile()) {
199 $wgOut->addHTML("<div class=\"fullMedia\">");
200 $wgOut->addHTML("<span class=\"dangerousLink\">");
201 $wgOut->addHTML($s);
202 $wgOut->addHTML("</span>");
203
204 $wgOut->addHTML("<span class=\"fileInfo\"> (");
205 $wgOut->addWikiText( $info, false );
206 $wgOut->addHTML(")</span>");
207 $wgOut->addHTML("</div>");
208
209 #this should be formated a little nicer. Is CSS sufficient?
210 $wgOut->addHTML("<div class=\"mediaWarning\">");
211 $wgOut->addWikiText( wfMsg( 'mediawarning' ) );
212 $wgOut->addHTML('</div>');
213
214 } else {
215 $wgOut->addHTML("<div class=\"fullMedia\">");
216 $wgOut->addHTML($s);
217
218 $wgOut->addHTML("<span class=\"fileInfo\"> (");
219 $wgOut->addWikiText( $info, false );
220 $wgOut->addHTML(")</span>");
221
222 $wgOut->addHTML("</div>");
223 }
224 }
225
226 if($this->img->fromSharedDirectory) {
227 $sharedtext="<div class=\"sharedUploadNotice\">" . wfMsg("sharedupload");
228 if($wgRepositoryBaseUrl) {
229 $sharedtext .= " ". wfMsg("shareduploadwiki",$wgRepositoryBaseUrl . urlencode($this->mTitle->getDBkey()));
230 }
231 $sharedtext.="</div>";
232 $wgOut->addWikiText($sharedtext);
233 }
234
235 } else {
236 # Image does not exist
237 $wgOut->addWikiText( wfMsg( 'noimage', $this->getUploadUrl() ) );
238 }
239 }
240
241 function getUploadUrl() {
242 global $wgServer;
243 $uploadTitle = Title::makeTitle( NS_SPECIAL, 'Upload' );
244 return $wgServer . $uploadTitle->getLocalUrl( 'wpDestFile=' . urlencode( $this->img->getName() ) );
245 }
246
247
248 function uploadLinksBox()
249 {
250 global $wgUser,$wgOut;
251 $sk = $wgUser->getSkin();
252 $wgOut->addHTML( '<br /><ul><li>' );
253 $wgOut->addWikiText( '<div>'. wfMsg( 'uploadnewversion', $this->getUploadUrl() ) .'</div>' );
254 $wgOut->addHTML( '</li><li>' );
255 $wgOut->addHTML( $sk->makeKnownLinkObj( $this->mTitle,
256 wfMsg( 'edit-externally' ), "action=edit&externaledit=true&mode=file" ) );
257 $wgOut->addWikiText( '<div>' . wfMsg('edit-externally-help') . '</div>' );
258 $wgOut->addHTML( '</li></ul>' );
259 }
260
261 function closeShowImage()
262 {
263 # For overloading
264
265 }
266
267 /**
268 * If the page we've just displayed is in the "Image" namespace,
269 * we follow it with an upload history of the image and its usage.
270 */
271 function imageHistory()
272 {
273 global $wgUser, $wgOut, $wgUseExternalEditor;
274
275 $sk = $wgUser->getSkin();
276
277 $line = $this->img->nextHistoryLine();
278
279 if ( $line ) {
280 $list =& new ImageHistoryList( $sk );
281 $s = $list->beginImageHistoryList() .
282 $list->imageHistoryLine( true, $line->img_timestamp,
283 $this->mTitle->getDBkey(), $line->img_user,
284 $line->img_user_text, $line->img_size, $line->img_description );
285
286 while ( $line = $this->img->nextHistoryLine() ) {
287 $s .= $list->imageHistoryLine( false, $line->img_timestamp,
288 $line->oi_archive_name, $line->img_user,
289 $line->img_user_text, $line->img_size, $line->img_description );
290 }
291 $s .= $list->endImageHistoryList();
292 } else { $s=''; }
293 $wgOut->addHTML( $s );
294
295 # Exist check because we don't want to show this on pages where an image
296 # doesn't exist along with the noimage message, that would suck. -ævar
297 if( $wgUseExternalEditor && $this->img->exists() ) {
298 $this->uploadLinksBox();
299 }
300
301 }
302
303 function imageLinks()
304 {
305 global $wgUser, $wgOut;
306
307 $wgOut->addHTML( '<h2 id="filelinks">' . wfMsg( 'imagelinks' ) . "</h2>\n" );
308
309 $dbr =& wfGetDB( DB_SLAVE );
310 $page = $dbr->tableName( 'page' );
311 $imagelinks = $dbr->tableName( 'imagelinks' );
312
313 $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
314 $dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=page_id"
315 . " LIMIT 500"; # quickie emergency brake
316 $res = $dbr->query( $sql, "ImagePage::imageLinks" );
317
318 if ( 0 == $dbr->numRows( $res ) ) {
319 $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
320 return;
321 }
322 $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) . "</p>\n<ul>" );
323
324 $sk = $wgUser->getSkin();
325 while ( $s = $dbr->fetchObject( $res ) ) {
326 $name = Title::MakeTitle( $s->page_namespace, $s->page_title );
327 $link = $sk->makeKnownLinkObj( $name, "" );
328 $wgOut->addHTML( "<li>{$link}</li>\n" );
329 }
330 $wgOut->addHTML( "</ul>\n" );
331 }
332
333 function delete()
334 {
335 global $wgUser, $wgOut, $wgRequest;
336
337 $confirm = $wgRequest->getBool( 'wpConfirmB' );
338 $image = $wgRequest->getVal( 'image' );
339 $oldimage = $wgRequest->getVal( 'oldimage' );
340
341 # Only sysops can delete images. Previously ordinary users could delete
342 # old revisions, but this is no longer the case.
343 if ( !$wgUser->isAllowed('delete') ) {
344 $wgOut->sysopRequired();
345 return;
346 }
347 if ( wfReadOnly() ) {
348 $wgOut->readOnlyPage();
349 return;
350 }
351
352 # Better double-check that it hasn't been deleted yet!
353 $wgOut->setPagetitle( wfMsg( 'confirmdelete' ) );
354 if ( ( !is_null( $image ) )
355 && ( '' == trim( $image ) ) ) {
356 $wgOut->fatalError( wfMsg( 'cannotdelete' ) );
357 return;
358 }
359
360 $this->img = new Image( $this->mTitle );
361
362 # Deleting old images doesn't require confirmation
363 if ( !is_null( $oldimage ) || $confirm ) {
364 if( $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
365 $this->doDelete();
366 } else {
367 $wgOut->fatalError( wfMsg( 'sessionfailure' ) );
368 }
369 return;
370 }
371
372 if ( !is_null( $image ) ) {
373 $q = '&image=' . urlencode( $image );
374 } else if ( !is_null( $oldimage ) ) {
375 $q = '&oldimage=' . urlencode( $oldimage );
376 } else {
377 $q = '';
378 }
379 return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) );
380 }
381
382 function doDelete()
383 {
384 global $wgOut, $wgUser, $wgContLang, $wgRequest;
385 global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList;
386 $fname = 'ImagePage::doDelete';
387
388 $reason = $wgRequest->getVal( 'wpReason' );
389 $oldimage = $wgRequest->getVal( 'oldimage' );
390
391 $dbw =& wfGetDB( DB_MASTER );
392
393 if ( !is_null( $oldimage ) ) {
394 if ( strlen( $oldimage ) < 16 ) {
395 $wgOut->unexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
396 return;
397 }
398 if ( strstr( $oldimage, "/" ) || strstr( $oldimage, "\\" ) ) {
399 $wgOut->unexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
400 return;
401 }
402
403 # Invalidate description page cache
404 $this->mTitle->invalidateCache();
405
406 # Squid purging
407 if ( $wgUseSquid ) {
408 $urlArr = Array(
409 $wgInternalServer.wfImageArchiveUrl( $oldimage ),
410 $wgInternalServer.$this->mTitle->getFullURL()
411 );
412 wfPurgeSquidServers($urlArr);
413 }
414 $this->doDeleteOldImage( $oldimage );
415 $dbw->delete( 'oldimage', array( 'oi_archive_name' => $oldimage ) );
416 $deleted = $oldimage;
417 } else {
418 $image = $this->mTitle->getDBkey();
419 $dest = wfImageDir( $image );
420 $archive = wfImageDir( $image );
421
422 # Delete the image file if it exists; due to sync problems
423 # or manual trimming sometimes the file will be missing.
424 $targetFile = "{$dest}/{$image}";
425 if( file_exists( $targetFile ) && ! @unlink( $targetFile ) ) {
426 # If the deletion operation actually failed, bug out:
427 $wgOut->fileDeleteError( $targetFile );
428 return;
429 }
430 $dbw->delete( 'image', array( 'img_name' => $image ) );
431 $res = $dbw->select( 'oldimage', array( 'oi_archive_name' ), array( 'oi_name' => $image ) );
432
433 # Purge archive URLs from the squid
434 $urlArr = Array();
435 while ( $s = $dbw->fetchObject( $res ) ) {
436 $this->doDeleteOldImage( $s->oi_archive_name );
437 $urlArr[] = $wgInternalServer.wfImageArchiveUrl( $s->oi_archive_name );
438 }
439
440 # And also the HTML of all pages using this image
441 $linksTo = $this->img->getLinksTo();
442 if ( $wgUseSquid ) {
443 $u = SquidUpdate::newFromTitles( $linksTo, $urlArr );
444 array_push( $wgPostCommitUpdateList, $u );
445 }
446
447 $dbw->delete( 'oldimage', array( 'oi_name' => $image ) );
448
449 # Image itself is now gone, and database is cleaned.
450 # Now we remove the image description page.
451
452 $article = new Article( $this->mTitle );
453 $article->doDeleteArticle( $reason ); # ignore errors
454
455 # Invalidate parser cache and client cache for pages using this image
456 # This is left until relatively late to reduce lock time
457 Title::touchArray( $linksTo );
458
459 /* Delete thumbnails and refresh image metadata cache */
460 $this->img->purgeCache();
461
462
463 $deleted = $image;
464 }
465
466 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
467 $wgOut->setRobotpolicy( 'noindex,nofollow' );
468
469 $loglink = '[[Special:Log/delete|' . wfMsg( 'deletionlog' ) . ']]';
470 $text = wfMsg( 'deletedtext', $deleted, $loglink );
471
472 $wgOut->addWikiText( $text );
473
474 $wgOut->returnToMain( false, $this->mTitle->getPrefixedText() );
475 }
476
477 function doDeleteOldImage( $oldimage )
478 {
479 global $wgOut;
480
481 $name = substr( $oldimage, 15 );
482 $archive = wfImageArchiveDir( $name );
483
484 # Delete the image if it exists. Sometimes the file will be missing
485 # due to manual intervention or weird sync problems; treat that
486 # condition gracefully and continue to delete the database entry.
487 # Also some records may end up with an empty oi_archive_name field
488 # if the original file was missing when a new upload was made;
489 # don't try to delete the directory then!
490 #
491 $targetFile = "{$archive}/{$oldimage}";
492 if( $oldimage != '' && file_exists( $targetFile ) && !@unlink( $targetFile ) ) {
493 # If we actually have a file and can't delete it, throw an error.
494 $wgOut->fileDeleteError( "{$archive}/{$oldimage}" );
495 } else {
496 # Log the deletion
497 $log = new LogPage( 'delete' );
498 $log->addEntry( 'delete', $this->mTitle, wfMsg('deletedrevision',$oldimage) );
499 }
500 }
501
502 function revert()
503 {
504 global $wgOut, $wgRequest, $wgUser;
505 global $wgUseSquid, $wgInternalServer, $wgDeferredUpdateList;
506
507 $oldimage = $wgRequest->getText( 'oldimage' );
508 if ( strlen( $oldimage ) < 16 ) {
509 $wgOut->unexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
510 return;
511 }
512 if ( strstr( $oldimage, "/" ) || strstr( $oldimage, "\\" ) ) {
513 $wgOut->unexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
514 return;
515 }
516
517 if ( wfReadOnly() ) {
518 $wgOut->readOnlyPage();
519 return;
520 }
521 if( $wgUser->isAnon() ) {
522 $wgOut->errorpage( 'uploadnologin', 'uploadnologintext' );
523 return;
524 }
525 if ( ! $this->mTitle->userCanEdit() ) {
526 $wgOut->sysopRequired();
527 return;
528 }
529 if( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
530 $wgOut->errorpage( 'internalerror', 'sessionfailure' );
531 return;
532 }
533 $name = substr( $oldimage, 15 );
534
535 $dest = wfImageDir( $name );
536 $archive = wfImageArchiveDir( $name );
537 $curfile = "{$dest}/{$name}";
538
539 if ( ! is_file( $curfile ) ) {
540 $wgOut->fileNotFoundError( htmlspecialchars( $curfile ) );
541 return;
542 }
543 $oldver = wfTimestampNow() . "!{$name}";
544
545 $dbr =& wfGetDB( DB_SLAVE );
546 $size = $dbr->selectField( 'oldimage', 'oi_size', array( 'oi_archive_name' => $oldimage ) );
547
548 if ( ! rename( $curfile, "${archive}/{$oldver}" ) ) {
549 $wgOut->fileRenameError( $curfile, "${archive}/{$oldver}" );
550 return;
551 }
552 if ( ! copy( "{$archive}/{$oldimage}", $curfile ) ) {
553 $wgOut->fileCopyError( "${archive}/{$oldimage}", $curfile );
554 }
555
556 # Record upload and update metadata cache
557 $img = Image::newFromName( $name );
558 $img->recordUpload( $oldver, wfMsg( "reverted" ) );
559
560 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
561 $wgOut->setRobotpolicy( 'noindex,nofollow' );
562 $wgOut->addHTML( wfMsg( 'imagereverted' ) );
563
564 $descTitle = $img->getTitle();
565 $wgOut->returnToMain( false, $descTitle->getPrefixedText() );
566 }
567 }
568
569 /**
570 * @todo document
571 * @package MediaWiki
572 */
573 class ImageHistoryList {
574 function ImageHistoryList( &$skin ) {
575 $this->skin =& $skin;
576 }
577
578 function beginImageHistoryList() {
579 $s = "\n<h2 id=\"filehistory\">" . wfMsg( 'imghistory' ) . "</h2>\n" .
580 "<p>" . wfMsg( 'imghistlegend' ) . "</p>\n".'<ul class="special">';
581 return $s;
582 }
583
584 function endImageHistoryList() {
585 $s = "</ul>\n";
586 return $s;
587 }
588
589 function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description ) {
590 global $wgUser, $wgLang, $wgContLang, $wgTitle;
591
592 $datetime = $wgLang->timeanddate( $timestamp, true );
593 $del = wfMsg( 'deleteimg' );
594 $delall = wfMsg( 'deleteimgcompletely' );
595 $cur = wfMsg( 'cur' );
596
597 if ( $iscur ) {
598 $url = Image::imageUrl( $img );
599 $rlink = $cur;
600 if ( $wgUser->isAllowed('delete') ) {
601 $link = $wgTitle->escapeLocalURL( 'image=' . $wgTitle->getPartialURL() .
602 '&action=delete' );
603 $style = $this->skin->getInternalLinkAttributes( $link, $delall );
604
605 $dlink = '<a href="'.$link.'"'.$style.'>'.$delall.'</a>';
606 } else {
607 $dlink = $del;
608 }
609 } else {
610 $url = htmlspecialchars( wfImageArchiveUrl( $img ) );
611 if( $wgUser->getID() != 0 && $wgTitle->userCanEdit() ) {
612 $token = urlencode( $wgUser->editToken( $img ) );
613 $rlink = $this->skin->makeKnownLinkObj( $wgTitle,
614 wfMsg( 'revertimg' ), 'action=revert&oldimage=' .
615 urlencode( $img ) . "&wpEditToken=$token" );
616 $dlink = $this->skin->makeKnownLinkObj( $wgTitle,
617 $del, 'action=delete&oldimage=' . urlencode( $img ) .
618 "&wpEditToken=$token" );
619 } else {
620 # Having live active links for non-logged in users
621 # means that bots and spiders crawling our site can
622 # inadvertently change content. Baaaad idea.
623 $rlink = wfMsg( 'revertimg' );
624 $dlink = $del;
625 }
626 }
627 if ( 0 == $user ) {
628 $userlink = $usertext;
629 } else {
630 $userlink = $this->skin->makeLinkObj(
631 Title::makeTitle( NS_USER, $usertext ),
632 $usertext );
633 }
634 $nbytes = wfMsg( 'nbytes', $size );
635 $style = $this->skin->getInternalLinkAttributes( $url, $datetime );
636
637 $s = "<li> ({$dlink}) ({$rlink}) <a href=\"{$url}\"{$style}>{$datetime}</a>"
638 . " . . {$userlink} ({$nbytes})";
639
640 $s .= $this->skin->commentBlock( $description, $wgTitle );
641 $s .= "</li>\n";
642 return $s;
643 }
644
645 }
646
647
648 ?>