* Cleanup syntax
[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 $url = $thumbnail->getUrl();
162 } else {
163 # No resize ability? Show the full image, but scale
164 # it down in the browser so it fits on the page.
165 $url = $full_url;
166 }
167 $anchoropen = "<a href=\"{$full_url}\">";
168 $anchorclose = "</a><br />\n$anchoropen{$msg}</a>";
169 } else {
170 $url = $full_url;
171 $showLink = $this->img->mustRender();
172 }
173 $wgOut->addHTML( '<div class="fullImageLink" id="file">' . $anchoropen .
174 "<img border=\"0\" src=\"{$url}\" width=\"{$width}\" height=\"{$height}\" alt=\"" .
175 htmlspecialchars( $wgRequest->getVal( 'image' ) ).'" />' . $anchorclose . '</div>' );
176 } else {
177 #if direct link is allowed but it's not a renderable image, show an icon.
178 if ($this->img->isSafeFile()) {
179 $icon= $this->img->iconThumb();
180
181 $wgOut->addHTML( '<div class="fullImageLink" id="file"><a href="' . $full_url . '">' .
182 $icon->toHtml() .
183 '</a></div>' );
184 }
185
186 $showLink = true;
187 }
188
189
190 if ($showLink) {
191 $s= $sk->makeMediaLink( $this->img->getName(), '', '', true );
192 $info= wfMsg( 'fileinfo', ceil($this->img->getSize()/1024.0), $this->img->getMimeType() );
193
194 if (!$this->img->isSafeFile()) {
195 $wgOut->addHTML("<div class=\"fullMedia\">");
196 $wgOut->addHTML("<span class=\"dangerousLink\">");
197 $wgOut->addHTML($s);
198 $wgOut->addHTML("</span>");
199
200 $wgOut->addHTML("<span class=\"fileInfo\"> (");
201 $wgOut->addWikiText( $info, false );
202 $wgOut->addHTML(")</span>");
203 $wgOut->addHTML("</div>");
204
205 #this should be formated a little nicer. Is CSS sufficient?
206 $wgOut->addHTML("<div class=\"mediaWarning\">");
207 $wgOut->addWikiText( wfMsg( 'mediawarning' ) );
208 $wgOut->addHTML('</div>');
209
210 } else {
211 $wgOut->addHTML("<div class=\"fullMedia\">");
212 $wgOut->addHTML($s);
213
214 $wgOut->addHTML("<span class=\"fileInfo\"> (");
215 $wgOut->addWikiText( $info, false );
216 $wgOut->addHTML(")</span>");
217
218 $wgOut->addHTML("</div>");
219 }
220 }
221
222 if($this->img->fromSharedDirectory) {
223 $sharedtext="<div class=\"sharedUploadNotice\">" . wfMsg("sharedupload");
224 if($wgRepositoryBaseUrl) {
225 $sharedtext .= " ". wfMsg("shareduploadwiki",$wgRepositoryBaseUrl . urlencode($this->mTitle->getDBkey()));
226 }
227 $sharedtext.="</div>";
228 $wgOut->addWikiText($sharedtext);
229 }
230
231 } else {
232 # Image does not exist
233 $wgOut->addWikiText( wfMsg( 'noimage', $this->getUploadUrl() ) );
234 }
235 }
236
237 function getUploadUrl() {
238 global $wgServer;
239 $uploadTitle = Title::makeTitle( NS_SPECIAL, 'Upload' );
240 return $wgServer . $uploadTitle->getLocalUrl( 'wpDestFile=' . urlencode( $this->img->getName() ) );
241 }
242
243
244 function uploadLinksBox()
245 {
246 global $wgUser,$wgOut;
247 $sk = $wgUser->getSkin();
248 $wgOut->addHTML( '<br /><ul><li>' );
249 $wgOut->addWikiText( '<div>'. wfMsg( 'uploadnewversion', $this->getUploadUrl() ) .'</div>' );
250 $wgOut->addHTML( '</li><li>' );
251 $wgOut->addHTML( $sk->makeKnownLinkObj( $this->mTitle,
252 wfMsg( 'edit-externally' ), "action=edit&externaledit=true&mode=file" ) );
253 $wgOut->addWikiText( '<div>' . wfMsg('edit-externally-help') . '</div>' );
254 $wgOut->addHTML( '</li></ul>' );
255 }
256
257 function closeShowImage()
258 {
259 # For overloading
260
261 }
262
263 /**
264 * If the page we've just displayed is in the "Image" namespace,
265 * we follow it with an upload history of the image and its usage.
266 */
267 function imageHistory()
268 {
269 global $wgUser, $wgOut, $wgUseExternalEditor;
270
271 $sk = $wgUser->getSkin();
272
273 $line = $this->img->nextHistoryLine();
274
275 if ( $line ) {
276 $list =& new ImageHistoryList( $sk );
277 $s = $list->beginImageHistoryList() .
278 $list->imageHistoryLine( true, $line->img_timestamp,
279 $this->mTitle->getDBkey(), $line->img_user,
280 $line->img_user_text, $line->img_size, $line->img_description );
281
282 while ( $line = $this->img->nextHistoryLine() ) {
283 $s .= $list->imageHistoryLine( false, $line->img_timestamp,
284 $line->oi_archive_name, $line->img_user,
285 $line->img_user_text, $line->img_size, $line->img_description );
286 }
287 $s .= $list->endImageHistoryList();
288 } else { $s=''; }
289 $wgOut->addHTML( $s );
290
291 # Exist check because we don't want to show this on pages where an image
292 # doesn't exist along with the noimage message, that would suck. -ævar
293 if( $wgUseExternalEditor && $this->img->exists() ) {
294 $this->uploadLinksBox();
295 }
296
297 }
298
299 function imageLinks()
300 {
301 global $wgUser, $wgOut;
302
303 $wgOut->addHTML( '<h2 id="filelinks">' . wfMsg( 'imagelinks' ) . "</h2>\n" );
304
305 $dbr =& wfGetDB( DB_SLAVE );
306 $page = $dbr->tableName( 'page' );
307 $imagelinks = $dbr->tableName( 'imagelinks' );
308
309 $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
310 $dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=page_id"
311 . " LIMIT 500"; # quickie emergency brake
312 $res = $dbr->query( $sql, "ImagePage::imageLinks" );
313
314 if ( 0 == $dbr->numRows( $res ) ) {
315 $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
316 return;
317 }
318 $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) . "</p>\n<ul>" );
319
320 $sk = $wgUser->getSkin();
321 while ( $s = $dbr->fetchObject( $res ) ) {
322 $name = Title::MakeTitle( $s->page_namespace, $s->page_title );
323 $link = $sk->makeKnownLinkObj( $name, "" );
324 $wgOut->addHTML( "<li>{$link}</li>\n" );
325 }
326 $wgOut->addHTML( "</ul>\n" );
327 }
328
329 function delete()
330 {
331 global $wgUser, $wgOut, $wgRequest;
332
333 $confirm = $wgRequest->getBool( 'wpConfirmB' );
334 $image = $wgRequest->getVal( 'image' );
335 $oldimage = $wgRequest->getVal( 'oldimage' );
336
337 # Only sysops can delete images. Previously ordinary users could delete
338 # old revisions, but this is no longer the case.
339 if ( !$wgUser->isAllowed('delete') ) {
340 $wgOut->sysopRequired();
341 return;
342 }
343 if ( wfReadOnly() ) {
344 $wgOut->readOnlyPage();
345 return;
346 }
347
348 # Better double-check that it hasn't been deleted yet!
349 $wgOut->setPagetitle( wfMsg( 'confirmdelete' ) );
350 if ( ( !is_null( $image ) )
351 && ( '' == trim( $image ) ) ) {
352 $wgOut->fatalError( wfMsg( 'cannotdelete' ) );
353 return;
354 }
355
356 $this->img = new Image( $this->mTitle );
357
358 # Deleting old images doesn't require confirmation
359 if ( !is_null( $oldimage ) || $confirm ) {
360 if( $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
361 $this->doDelete();
362 } else {
363 $wgOut->fatalError( wfMsg( 'sessionfailure' ) );
364 }
365 return;
366 }
367
368 if ( !is_null( $image ) ) {
369 $q = '&image=' . urlencode( $image );
370 } else if ( !is_null( $oldimage ) ) {
371 $q = '&oldimage=' . urlencode( $oldimage );
372 } else {
373 $q = '';
374 }
375 return $this->confirmDelete( $q, $wgRequest->getText( 'wpReason' ) );
376 }
377
378 function doDelete()
379 {
380 global $wgOut, $wgUser, $wgContLang, $wgRequest;
381 global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList;
382 $fname = 'ImagePage::doDelete';
383
384 $reason = $wgRequest->getVal( 'wpReason' );
385 $oldimage = $wgRequest->getVal( 'oldimage' );
386
387 $dbw =& wfGetDB( DB_MASTER );
388
389 if ( !is_null( $oldimage ) ) {
390 if ( strlen( $oldimage ) < 16 ) {
391 $wgOut->unexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
392 return;
393 }
394 if ( strstr( $oldimage, "/" ) || strstr( $oldimage, "\\" ) ) {
395 $wgOut->unexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
396 return;
397 }
398
399 # Invalidate description page cache
400 $this->mTitle->invalidateCache();
401
402 # Squid purging
403 if ( $wgUseSquid ) {
404 $urlArr = Array(
405 $wgInternalServer.wfImageArchiveUrl( $oldimage ),
406 $wgInternalServer.$this->mTitle->getFullURL()
407 );
408 wfPurgeSquidServers($urlArr);
409 }
410 $this->doDeleteOldImage( $oldimage );
411 $dbw->delete( 'oldimage', array( 'oi_archive_name' => $oldimage ) );
412 $deleted = $oldimage;
413 } else {
414 $image = $this->mTitle->getDBkey();
415 $dest = wfImageDir( $image );
416 $archive = wfImageDir( $image );
417
418 # Delete the image file if it exists; due to sync problems
419 # or manual trimming sometimes the file will be missing.
420 $targetFile = "{$dest}/{$image}";
421 if( file_exists( $targetFile ) && ! @unlink( $targetFile ) ) {
422 # If the deletion operation actually failed, bug out:
423 $wgOut->fileDeleteError( $targetFile );
424 return;
425 }
426 $dbw->delete( 'image', array( 'img_name' => $image ) );
427 $res = $dbw->select( 'oldimage', array( 'oi_archive_name' ), array( 'oi_name' => $image ) );
428
429 # Purge archive URLs from the squid
430 $urlArr = Array();
431 while ( $s = $dbw->fetchObject( $res ) ) {
432 $this->doDeleteOldImage( $s->oi_archive_name );
433 $urlArr[] = $wgInternalServer.wfImageArchiveUrl( $s->oi_archive_name );
434 }
435
436 # And also the HTML of all pages using this image
437 $linksTo = $this->img->getLinksTo();
438 if ( $wgUseSquid ) {
439 $u = SquidUpdate::newFromTitles( $linksTo, $urlArr );
440 array_push( $wgPostCommitUpdateList, $u );
441 }
442
443 $dbw->delete( 'oldimage', array( 'oi_name' => $image ) );
444
445 # Image itself is now gone, and database is cleaned.
446 # Now we remove the image description page.
447
448 $article = new Article( $this->mTitle );
449 $article->doDeleteArticle( $reason ); # ignore errors
450
451 # Invalidate parser cache and client cache for pages using this image
452 # This is left until relatively late to reduce lock time
453 Title::touchArray( $linksTo );
454
455 /* Delete thumbnails and refresh image metadata cache */
456 $this->img->purgeCache();
457
458
459 $deleted = $image;
460 }
461
462 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
463 $wgOut->setRobotpolicy( 'noindex,nofollow' );
464
465 $sk = $wgUser->getSkin();
466 $loglink = $sk->makeKnownLinkObj(
467 Title::makeTitle( NS_SPECIAL, 'Log/delete' ),
468 wfMsg( 'deletionlog' ) );
469
470 $text = wfMsg( 'deletedtext', $deleted, $loglink );
471
472 $wgOut->addHTML( '<p>' . $text . "</p>\n" );
473 $wgOut->returnToMain( false, $this->mTitle->getPrefixedText() );
474 }
475
476 function doDeleteOldImage( $oldimage )
477 {
478 global $wgOut;
479
480 $name = substr( $oldimage, 15 );
481 $archive = wfImageArchiveDir( $name );
482
483 # Delete the image if it exists. Sometimes the file will be missing
484 # due to manual intervention or weird sync problems; treat that
485 # condition gracefully and continue to delete the database entry.
486 # Also some records may end up with an empty oi_archive_name field
487 # if the original file was missing when a new upload was made;
488 # don't try to delete the directory then!
489 #
490 $targetFile = "{$archive}/{$oldimage}";
491 if( $oldimage != '' && file_exists( $targetFile ) && !@unlink( $targetFile ) ) {
492 # If we actually have a file and can't delete it, throw an error.
493 $wgOut->fileDeleteError( "{$archive}/{$oldimage}" );
494 } else {
495 # Log the deletion
496 $log = new LogPage( 'delete' );
497 $log->addEntry( 'delete', $this->mTitle, wfMsg('deletedrevision',$oldimage) );
498 }
499 }
500
501 function revert()
502 {
503 global $wgOut, $wgRequest, $wgUser;
504 global $wgUseSquid, $wgInternalServer, $wgDeferredUpdateList;
505
506 $oldimage = $wgRequest->getText( 'oldimage' );
507 if ( strlen( $oldimage ) < 16 ) {
508 $wgOut->unexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
509 return;
510 }
511 if ( strstr( $oldimage, "/" ) || strstr( $oldimage, "\\" ) ) {
512 $wgOut->unexpectedValueError( 'oldimage', htmlspecialchars($oldimage) );
513 return;
514 }
515
516 if ( wfReadOnly() ) {
517 $wgOut->readOnlyPage();
518 return;
519 }
520 if( $wgUser->isAnon() ) {
521 $wgOut->errorpage( 'uploadnologin', 'uploadnologintext' );
522 return;
523 }
524 if ( ! $this->mTitle->userCanEdit() ) {
525 $wgOut->sysopRequired();
526 return;
527 }
528 if( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ), $oldimage ) ) {
529 $wgOut->errorpage( 'internalerror', 'sessionfailure' );
530 return;
531 }
532 $name = substr( $oldimage, 15 );
533
534 $dest = wfImageDir( $name );
535 $archive = wfImageArchiveDir( $name );
536 $curfile = "{$dest}/{$name}";
537
538 if ( ! is_file( $curfile ) ) {
539 $wgOut->fileNotFoundError( htmlspecialchars( $curfile ) );
540 return;
541 }
542 $oldver = wfTimestampNow() . "!{$name}";
543
544 $dbr =& wfGetDB( DB_SLAVE );
545 $size = $dbr->selectField( 'oldimage', 'oi_size', array( 'oi_archive_name' => $oldimage ) );
546
547 if ( ! rename( $curfile, "${archive}/{$oldver}" ) ) {
548 $wgOut->fileRenameError( $curfile, "${archive}/{$oldver}" );
549 return;
550 }
551 if ( ! copy( "{$archive}/{$oldimage}", $curfile ) ) {
552 $wgOut->fileCopyError( "${archive}/{$oldimage}", $curfile );
553 }
554
555 # Record upload and update metadata cache
556 $img = Image::newFromName( $name );
557 $img->recordUpload( $oldver, wfMsg( "reverted" ) );
558
559 $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
560 $wgOut->setRobotpolicy( 'noindex,nofollow' );
561 $wgOut->addHTML( wfMsg( 'imagereverted' ) );
562
563 $descTitle = $img->getTitle();
564 $wgOut->returnToMain( false, $descTitle->getPrefixedText() );
565 }
566 }
567
568 /**
569 * @todo document
570 * @package MediaWiki
571 */
572 class ImageHistoryList {
573 function ImageHistoryList( &$skin ) {
574 $this->skin =& $skin;
575 }
576
577 function beginImageHistoryList() {
578 $s = "\n<h2 id=\"filehistory\">" . wfMsg( 'imghistory' ) . "</h2>\n" .
579 "<p>" . wfMsg( 'imghistlegend' ) . "</p>\n".'<ul class="special">';
580 return $s;
581 }
582
583 function endImageHistoryList() {
584 $s = "</ul>\n";
585 return $s;
586 }
587
588 function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description ) {
589 global $wgUser, $wgLang, $wgContLang, $wgTitle;
590
591 $datetime = $wgLang->timeanddate( $timestamp, true );
592 $del = wfMsg( 'deleteimg' );
593 $delall = wfMsg( 'deleteimgcompletely' );
594 $cur = wfMsg( 'cur' );
595
596 if ( $iscur ) {
597 $url = Image::imageUrl( $img );
598 $rlink = $cur;
599 if ( $wgUser->isAllowed('delete') ) {
600 $link = $wgTitle->escapeLocalURL( 'image=' . $wgTitle->getPartialURL() .
601 '&action=delete' );
602 $style = $this->skin->getInternalLinkAttributes( $link, $delall );
603
604 $dlink = '<a href="'.$link.'"'.$style.'>'.$delall.'</a>';
605 } else {
606 $dlink = $del;
607 }
608 } else {
609 $url = htmlspecialchars( wfImageArchiveUrl( $img ) );
610 if( $wgUser->getID() != 0 && $wgTitle->userCanEdit() ) {
611 $token = urlencode( $wgUser->editToken( $img ) );
612 $rlink = $this->skin->makeKnownLinkObj( $wgTitle,
613 wfMsg( 'revertimg' ), 'action=revert&oldimage=' .
614 urlencode( $img ) . "&wpEditToken=$token" );
615 $dlink = $this->skin->makeKnownLinkObj( $wgTitle,
616 $del, 'action=delete&oldimage=' . urlencode( $img ) .
617 "&wpEditToken=$token" );
618 } else {
619 # Having live active links for non-logged in users
620 # means that bots and spiders crawling our site can
621 # inadvertently change content. Baaaad idea.
622 $rlink = wfMsg( 'revertimg' );
623 $dlink = $del;
624 }
625 }
626 if ( 0 == $user ) {
627 $userlink = $usertext;
628 } else {
629 $userlink = $this->skin->makeLinkObj(
630 Title::makeTitle( NS_USER, $usertext ),
631 $usertext );
632 }
633 $nbytes = wfMsg( 'nbytes', $size );
634 $style = $this->skin->getInternalLinkAttributes( $url, $datetime );
635
636 $s = "<li> ({$dlink}) ({$rlink}) <a href=\"{$url}\"{$style}>{$datetime}</a>"
637 . " . . {$userlink} ({$nbytes})";
638
639 $s .= $this->skin->commentBlock( $description, $wgTitle );
640 $s .= "</li>\n";
641 return $s;
642 }
643
644 }
645
646
647 ?>