* Add wfReadOnlyReason() to supply the reason for the wiki being read only. Use it...
[lhc/web/wiklou.git] / includes / ImagePage.php
1 <?php
2 /**
3 */
4
5 /**
6 *
7 */
8 if( !defined( 'MEDIAWIKI' ) )
9 die( 1 );
10
11 /**
12 * Special handling for image description pages
13 *
14 * @addtogroup Media
15 */
16 class ImagePage extends Article {
17
18 /* private */ var $img; // Image object this page is shown for
19 /* private */ var $repo;
20 var $mExtraDescription = false;
21
22 function __construct( $title, $time = false ) {
23 parent::__construct( $title );
24 $this->img = wfFindFile( $this->mTitle, $time );
25 if ( !$this->img ) {
26 $this->img = wfLocalFile( $this->mTitle );
27 $this->current = $this->img;
28 } else {
29 $this->current = $time ? wfLocalFile( $this->mTitle ) : $this->img;
30 }
31 $this->repo = $this->img->repo;
32 }
33
34 /**
35 * Handler for action=render
36 * Include body text only; none of the image extras
37 */
38 function render() {
39 global $wgOut;
40 $wgOut->setArticleBodyOnly( true );
41 $wgOut->addSecondaryWikitext( $this->getContent() );
42 }
43
44 function view() {
45 global $wgOut, $wgShowEXIF, $wgRequest, $wgUser;
46
47 $diff = $wgRequest->getVal( 'diff' );
48 $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );
49
50 if ( $this->mTitle->getNamespace() != NS_IMAGE || ( isset( $diff ) && $diffOnly ) )
51 return Article::view();
52
53 if ($wgShowEXIF && $this->img->exists()) {
54 // FIXME: bad interface, see note on MediaHandler::formatMetadata().
55 $formattedMetadata = $this->img->formatMetadata();
56 $showmeta = $formattedMetadata !== false;
57 } else {
58 $showmeta = false;
59 }
60
61 if ($this->img->exists())
62 $wgOut->addHTML($this->showTOC($showmeta));
63
64 $this->openShowImage();
65
66 # No need to display noarticletext, we use our own message, output in openShowImage()
67 if ( $this->getID() ) {
68 Article::view();
69 } else {
70 # Just need to set the right headers
71 $wgOut->setArticleFlag( true );
72 $wgOut->setRobotpolicy( 'noindex,nofollow' );
73 $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
74 $this->viewUpdates();
75 }
76
77 # Show shared description, if needed
78 if ( $this->mExtraDescription ) {
79 $fol = wfMsgNoTrans( 'shareddescriptionfollows' );
80 if( $fol != '-' && !wfEmptyMsg( 'shareddescriptionfollows', $fol ) ) {
81 $wgOut->addWikiText( $fol );
82 }
83 $wgOut->addHTML( '<div id="shared-image-desc">' . $this->mExtraDescription . '</div>' );
84 }
85
86 $this->closeShowImage();
87 $this->imageHistory();
88 $this->imageLinks();
89
90 if ( $showmeta ) {
91 global $wgStylePath, $wgStyleVersion;
92 $expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) );
93 $collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) );
94 $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ). "\n" );
95 $wgOut->addWikiText( $this->makeMetadataTable( $formattedMetadata ) );
96 $wgOut->addHTML(
97 "<script type=\"text/javascript\" src=\"$wgStylePath/common/metadata.js?$wgStyleVersion\"></script>\n" .
98 "<script type=\"text/javascript\">attachMetadataToggle('mw_metadata', '$expand', '$collapse');</script>\n" );
99 }
100 }
101
102 /**
103 * Create the TOC
104 *
105 * @access private
106 *
107 * @param bool $metadata Whether or not to show the metadata link
108 * @return string
109 */
110 function showTOC( $metadata ) {
111 global $wgLang;
112 $r = '<ul id="filetoc">
113 <li><a href="#file">' . $wgLang->getNsText( NS_IMAGE ) . '</a></li>
114 <li><a href="#filehistory">' . wfMsgHtml( 'filehist' ) . '</a></li>
115 <li><a href="#filelinks">' . wfMsgHtml( 'imagelinks' ) . '</a></li>' .
116 ($metadata ? ' <li><a href="#metadata">' . wfMsgHtml( 'metadata' ) . '</a></li>' : '') . '
117 </ul>';
118 return $r;
119 }
120
121 /**
122 * Make a table with metadata to be shown in the output page.
123 *
124 * FIXME: bad interface, see note on MediaHandler::formatMetadata().
125 *
126 * @access private
127 *
128 * @param array $exif The array containing the EXIF data
129 * @return string
130 */
131 function makeMetadataTable( $metadata ) {
132 $r = wfMsg( 'metadata-help' ) . "\n\n";
133 $r .= "{| id=mw_metadata class=mw_metadata\n";
134 foreach ( $metadata as $type => $stuff ) {
135 foreach ( $stuff as $v ) {
136 $class = Sanitizer::escapeId( $v['id'] );
137 if( $type == 'collapsed' ) {
138 $class .= ' collapsable';
139 }
140 $r .= "|- class=\"$class\"\n";
141 $r .= "!| {$v['name']}\n";
142 $r .= "|| {$v['value']}\n";
143 }
144 }
145 $r .= '|}';
146 return $r;
147 }
148
149 /**
150 * Overloading Article's getContent method.
151 *
152 * Omit noarticletext if sharedupload; text will be fetched from the
153 * shared upload server if possible.
154 */
155 function getContent() {
156 if( $this->img && !$this->img->isLocal() && 0 == $this->getID() ) {
157 return '';
158 }
159 return Article::getContent();
160 }
161
162 function openShowImage() {
163 global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang, $wgContLang;
164
165 $full_url = $this->img->getURL();
166 $linkAttribs = false;
167 $sizeSel = intval( $wgUser->getOption( 'imagesize') );
168 if( !isset( $wgImageLimits[$sizeSel] ) ) {
169 $sizeSel = User::getDefaultOption( 'imagesize' );
170
171 // The user offset might still be incorrect, specially if
172 // $wgImageLimits got changed (see bug #8858).
173 if( !isset( $wgImageLimits[$sizeSel] ) ) {
174 // Default to the first offset in $wgImageLimits
175 $sizeSel = 0;
176 }
177 }
178 $max = $wgImageLimits[$sizeSel];
179 $maxWidth = $max[0];
180 $maxHeight = $max[1];
181 $sk = $wgUser->getSkin();
182 $dirmark = $wgContLang->getDirMark();
183
184 if ( $this->img->exists() ) {
185 # image
186 $page = $wgRequest->getIntOrNull( 'page' );
187 if ( is_null( $page ) ) {
188 $params = array();
189 $page = 1;
190 } else {
191 $params = array( 'page' => $page );
192 }
193 $width_orig = $this->img->getWidth();
194 $width = $width_orig;
195 $height_orig = $this->img->getHeight();
196 $height = $height_orig;
197 $mime = $this->img->getMimeType();
198 $showLink = false;
199 $linkAttribs = array( 'href' => $full_url );
200 $longDesc = $this->img->getLongDesc();
201
202 wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this , &$wgOut ) ) ;
203
204 if ( $this->img->allowInlineDisplay() ) {
205 # image
206
207 # "Download high res version" link below the image
208 #$msgsize = wfMsgHtml('file-info-size', $width_orig, $height_orig, $sk->formatSize( $this->img->getSize() ), $mime );
209 # We'll show a thumbnail of this image
210 if ( $width > $maxWidth || $height > $maxHeight ) {
211 # Calculate the thumbnail size.
212 # First case, the limiting factor is the width, not the height.
213 if ( $width / $height >= $maxWidth / $maxHeight ) {
214 $height = round( $height * $maxWidth / $width);
215 $width = $maxWidth;
216 # Note that $height <= $maxHeight now.
217 } else {
218 $newwidth = floor( $width * $maxHeight / $height);
219 $height = round( $height * $newwidth / $width );
220 $width = $newwidth;
221 # Note that $height <= $maxHeight now, but might not be identical
222 # because of rounding.
223 }
224 $msgbig = wfMsgHtml( 'show-big-image' );
225 $msgsmall = wfMsgExt( 'show-big-image-thumb',
226 array( 'parseinline' ), $wgLang->formatNum( $width ), $wgLang->formatNum( $height ) );
227 } else {
228 # Image is small enough to show full size on image page
229 $msgbig = htmlspecialchars( $this->img->getName() );
230 $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) );
231 }
232
233 $params['width'] = $width;
234 $thumbnail = $this->img->transform( $params );
235
236 $anchorclose = "<br />";
237 if( $this->img->mustRender() ) {
238 $showLink = true;
239 } else {
240 $anchorclose .=
241 $msgsmall .
242 '<br />' . Xml::tags( 'a', $linkAttribs, $msgbig ) . "$dirmark " . $longDesc;
243 }
244
245 if ( $this->img->isMultipage() ) {
246 $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
247 }
248
249 if ( $thumbnail ) {
250 $options = array(
251 'alt' => $this->img->getTitle()->getPrefixedText(),
252 'file-link' => true,
253 );
254 $wgOut->addHTML( '<div class="fullImageLink" id="file">' .
255 $thumbnail->toHtml( $options ) .
256 $anchorclose . '</div>' );
257 }
258
259 if ( $this->img->isMultipage() ) {
260 $count = $this->img->pageCount();
261
262 if ( $page > 1 ) {
263 $label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false );
264 $link = $sk->makeKnownLinkObj( $this->mTitle, $label, 'page='. ($page-1) );
265 $thumb1 = $sk->makeThumbLinkObj( $this->mTitle, $this->img, $link, $label, 'none',
266 array( 'page' => $page - 1 ) );
267 } else {
268 $thumb1 = '';
269 }
270
271 if ( $page < $count ) {
272 $label = wfMsg( 'imgmultipagenext' );
273 $link = $sk->makeKnownLinkObj( $this->mTitle, $label, 'page='. ($page+1) );
274 $thumb2 = $sk->makeThumbLinkObj( $this->mTitle, $this->img, $link, $label, 'none',
275 array( 'page' => $page + 1 ) );
276 } else {
277 $thumb2 = '';
278 }
279
280 global $wgScript;
281 $select = '<form name="pageselector" action="' .
282 htmlspecialchars( $wgScript ) .
283 '" method="get" onchange="document.pageselector.submit();">' .
284 Xml::hidden( 'title', $this->getTitle()->getPrefixedDbKey() );
285 $select .= $wgOut->parse( wfMsg( 'imgmultigotopre' ), false ) .
286 ' <select id="pageselector" name="page">';
287 for ( $i=1; $i <= $count; $i++ ) {
288 $select .= Xml::option( $wgLang->formatNum( $i ), $i,
289 $i == $page );
290 }
291 $select .= '</select>' . $wgOut->parse( wfMsg( 'imgmultigotopost' ), false ) .
292 '<input type="submit" value="' .
293 htmlspecialchars( wfMsg( 'imgmultigo' ) ) . '"></form>';
294
295 $wgOut->addHTML( '</td><td><div class="multipageimagenavbox">' .
296 "$select<hr />$thumb1\n$thumb2<br clear=\"all\" /></div></td></tr></table>" );
297 }
298 } else {
299 #if direct link is allowed but it's not a renderable image, show an icon.
300 if ($this->img->isSafeFile()) {
301 $icon= $this->img->iconThumb();
302
303 $wgOut->addHTML( '<div class="fullImageLink" id="file">' .
304 $icon->toHtml( array( 'desc-link' => true ) ) .
305 '</div>' );
306 }
307
308 $showLink = true;
309 }
310
311
312 if ($showLink) {
313 $filename = wfEscapeWikiText( $this->img->getName() );
314
315 if (!$this->img->isSafeFile()) {
316 $warning = wfMsgNoTrans( 'mediawarning' );
317 $wgOut->addWikiText( <<<EOT
318 <div class="fullMedia">
319 <span class="dangerousLink">[[Media:$filename|$filename]]</span>$dirmark
320 <span class="fileInfo"> $longDesc</span>
321 </div>
322
323 <div class="mediaWarning">$warning</div>
324 EOT
325 );
326 } else {
327 $wgOut->addWikiText( <<<EOT
328 <div class="fullMedia">
329 [[Media:$filename|$filename]]$dirmark <span class="fileInfo"> $longDesc</span>
330 </div>
331 EOT
332 );
333 }
334 }
335
336 if(!$this->img->isLocal()) {
337 $this->printSharedImageText();
338 }
339 } else {
340 # Image does not exist
341
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 ) );
346 }
347 }
348
349 /**
350 * Show a notice that the file is from a shared repository
351 */
352 function printSharedImageText() {
353 global $wgOut, $wgUser;
354
355 $descUrl = $this->img->getDescriptionUrl();
356 $descText = $this->img->getDescriptionText();
357 $s = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml( 'sharedupload' );
358 if ( $descUrl ) {
359 $sk = $wgUser->getSkin();
360 $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadwiki-linktext' ) );
361 $msg = ( $descText ) ? 'shareduploadwiki-desc' : 'shareduploadwiki';
362 $msg = wfMsgExt( $msg, array( 'parseinline', 'replaceafter' ), $link );
363 if ( $msg != '-' ) {
364 # Show message only if not voided by local sysops
365 $s .= $msg;
366 }
367 }
368 $s .= "</div>";
369 $wgOut->addHTML( $s );
370
371 if ( $descText ) {
372 $this->mExtraDescription = $descText;
373 }
374 }
375
376 function getUploadUrl() {
377 $uploadTitle = SpecialPage::getTitleFor( 'Upload' );
378 return $uploadTitle->getFullUrl( 'wpDestFile=' . urlencode( $this->img->getName() ) );
379 }
380
381 /**
382 * Print out the various links at the bottom of the image page, e.g. reupload,
383 * external editing (and instructions link) etc.
384 */
385 function uploadLinksBox() {
386 global $wgUser, $wgOut;
387
388 if( !$this->img->isLocal() )
389 return;
390
391 $sk = $wgUser->getSkin();
392
393 $wgOut->addHtml( '<br /><ul>' );
394
395 # "Upload a new version of this file" link
396 if( UploadForm::userCanReUpload($wgUser,$this->img->name) ) {
397 $ulink = $sk->makeExternalLink( $this->getUploadUrl(), wfMsg( 'uploadnewversion-linktext' ) );
398 $wgOut->addHtml( "<li><div class='plainlinks'>{$ulink}</div></li>" );
399 }
400
401 # External editing link
402 $elink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
403 $wgOut->addHtml( '<li>' . $elink . '<div>' . wfMsgWikiHtml( 'edit-externally-help' ) . '</div></li>' );
404
405 $wgOut->addHtml( '</ul>' );
406 }
407
408 function closeShowImage()
409 {
410 # For overloading
411
412 }
413
414 /**
415 * If the page we've just displayed is in the "Image" namespace,
416 * we follow it with an upload history of the image and its usage.
417 */
418 function imageHistory()
419 {
420 global $wgUser, $wgOut, $wgUseExternalEditor;
421
422 $sk = $wgUser->getSkin();
423
424 if ( $this->img->exists() ) {
425 $list = new ImageHistoryList( $sk, $this->current );
426 $file = $this->current;
427 $dims = $file->getDimensionsString();
428 $s = $list->beginImageHistoryList() .
429 $list->imageHistoryLine( true, wfTimestamp(TS_MW, $file->getTimestamp()),
430 $this->mTitle->getDBkey(), $file->getUser('id'),
431 $file->getUser('text'), $file->getSize(), $file->getDescription(),
432 $dims
433 );
434
435 $hist = $this->img->getHistory();
436 foreach( $hist as $file ) {
437 $dims = $file->getDimensionsString();
438 $s .= $list->imageHistoryLine( false, wfTimestamp(TS_MW, $file->getTimestamp()),
439 $file->getArchiveName(), $file->getUser('id'),
440 $file->getUser('text'), $file->getSize(), $file->getDescription(),
441 $dims
442 );
443 }
444 $s .= $list->endImageHistoryList();
445 } else { $s=''; }
446 $wgOut->addHTML( $s );
447
448 $this->img->resetHistory(); // free db resources
449
450 # Exist check because we don't want to show this on pages where an image
451 # doesn't exist along with the noimage message, that would suck. -ævar
452 if( $wgUseExternalEditor && $this->img->exists() ) {
453 $this->uploadLinksBox();
454 }
455
456 }
457
458 function imageLinks()
459 {
460 global $wgUser, $wgOut;
461
462 $wgOut->addHTML( Xml::element( 'h2', array( 'id' => 'filelinks' ), wfMsg( 'imagelinks' ) ) . "\n" );
463
464 $dbr = wfGetDB( DB_SLAVE );
465 $page = $dbr->tableName( 'page' );
466 $imagelinks = $dbr->tableName( 'imagelinks' );
467
468 $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
469 $dbr->addQuotes( $this->mTitle->getDBkey() ) . " AND il_from=page_id";
470 $sql = $dbr->limitResult($sql, 500, 0);
471 $res = $dbr->query( $sql, "ImagePage::imageLinks" );
472
473 if ( 0 == $dbr->numRows( $res ) ) {
474 $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
475 return;
476 }
477 $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) . "</p>\n<ul>" );
478
479 $sk = $wgUser->getSkin();
480 while ( $s = $dbr->fetchObject( $res ) ) {
481 $name = Title::MakeTitle( $s->page_namespace, $s->page_title );
482 $link = $sk->makeKnownLinkObj( $name, "" );
483 $wgOut->addHTML( "<li>{$link}</li>\n" );
484 }
485 $wgOut->addHTML( "</ul>\n" );
486 }
487
488 /**
489 * Delete the file, or an earlier version of it
490 */
491 public function delete() {
492 if( !$this->img->exists() || !$this->img->isLocal() ) {
493 // Standard article deletion
494 Article::delete();
495 return;
496 }
497 $deleter = new FileDeleteForm( $this->img );
498 $deleter->execute();
499 }
500
501 /**
502 * Revert the file to an earlier version
503 */
504 public function revert() {
505 $reverter = new FileRevertForm( $this->img );
506 $reverter->execute();
507 }
508
509 /**
510 * Override handling of action=purge
511 */
512 function doPurge() {
513 if( $this->img->exists() ) {
514 wfDebug( "ImagePage::doPurge purging " . $this->img->getName() . "\n" );
515 $update = new HTMLCacheUpdate( $this->mTitle, 'imagelinks' );
516 $update->doUpdate();
517 $this->img->upgradeRow();
518 $this->img->purgeCache();
519 } else {
520 wfDebug( "ImagePage::doPurge no image\n" );
521 }
522 parent::doPurge();
523 }
524
525 /**
526 * Display an error with a wikitext description
527 */
528 function showError( $description ) {
529 global $wgOut;
530 $wgOut->setPageTitle( wfMsg( "internalerror" ) );
531 $wgOut->setRobotpolicy( "noindex,nofollow" );
532 $wgOut->setArticleRelated( false );
533 $wgOut->enableClientCache( false );
534 $wgOut->addWikiText( $description );
535 }
536
537 }
538
539 /**
540 * Builds the image revision log shown on image pages
541 *
542 * @addtogroup Media
543 */
544 class ImageHistoryList {
545
546 protected $img, $skin, $title, $repo;
547
548 public function __construct( $skin, $img ) {
549 $this->skin = $skin;
550 $this->img = $img;
551 $this->title = $img->getTitle();
552 }
553
554 public function beginImageHistoryList() {
555 global $wgOut, $wgUser;
556 return Xml::element( 'h2', array( 'id' => 'filehistory' ), wfMsg( 'filehist' ) )
557 . $wgOut->parse( wfMsgNoTrans( 'filehist-help' ) )
558 . Xml::openElement( 'table', array( 'class' => 'filehistory' ) ) . "\n"
559 . '<tr><td></td>'
560 . ( $this->img->isLocal() && $wgUser->isAllowed( 'delete' ) ? '<td></td>' : '' )
561 . '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>'
562 . '<th>' . wfMsgHtml( 'filehist-user' ) . '</th>'
563 . '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>'
564 . '<th class="mw-imagepage-filesize">' . wfMsgHtml( 'filehist-filesize' ) . '</th>'
565 . '<th>' . wfMsgHtml( 'filehist-comment' ) . '</th>'
566 . "</tr>\n";
567 }
568
569 public function endImageHistoryList() {
570 return "</table>\n";
571 }
572
573 /**
574 * Create one row of file history
575 *
576 * @param bool $iscur is this the current file version?
577 * @param string $timestamp timestamp of file version
578 * @param string $img filename
579 * @param int $user ID of uploading user
580 * @param string $usertext username of uploading user
581 * @param int $size size of file version
582 * @param string $description description of file version
583 * @param string $dims dimensions of file version
584 * @return string a HTML formatted table row
585 */
586 public function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description, $dims ) {
587 global $wgUser, $wgLang, $wgContLang;
588 $local = $this->img->isLocal();
589 $row = '';
590
591 // Deletion link
592 if( $local && $wgUser->isAllowed( 'delete' ) ) {
593 $row .= '<td>';
594 $q = array();
595 $q[] = 'action=delete';
596 if( !$iscur )
597 $q[] = 'oldimage=' . urlencode( $img );
598 $row .= $this->skin->makeKnownLinkObj(
599 $this->title,
600 wfMsgHtml( $iscur ? 'filehist-deleteall' : 'filehist-deleteone' ),
601 implode( '&', $q )
602 );
603 $row .= '</td>';
604 }
605
606 // Reversion link/current indicator
607 $row .= '<td>';
608 if( $iscur ) {
609 $row .= wfMsgHtml( 'filehist-current' );
610 } elseif( $local && $wgUser->isLoggedIn() && $this->title->userCan( 'edit' ) ) {
611 $q = array();
612 $q[] = 'action=revert';
613 $q[] = 'oldimage=' . urlencode( $img );
614 $q[] = 'wpEditToken=' . urlencode( $wgUser->editToken( $img ) );
615 $row .= $this->skin->makeKnownLinkObj(
616 $this->title,
617 wfMsgHtml( 'filehist-revert' ),
618 implode( '&', $q )
619 );
620 }
621 $row .= '</td>';
622
623 // Date/time and image link
624 $row .= '<td>';
625 $url = $iscur ? $this->img->getUrl() : $this->img->getArchiveUrl( $img );
626 $row .= Xml::element(
627 'a',
628 array( 'href' => $url ),
629 $wgLang->timeAndDate( $timestamp, true )
630 );
631 $row .= '</td>';
632
633 // Uploading user
634 $row .= '<td>';
635 if( $local ) {
636 $row .= $this->skin->userLink( $user, $usertext ) . $this->skin->userToolLinks( $user, $usertext );
637 } else {
638 $row .= htmlspecialchars( $usertext );
639 }
640 $row .= '</td>';
641
642 // Image dimensions
643 $row .= '<td>' . htmlspecialchars( $dims ) . '</td>';
644
645 // File size
646 $row .= '<td class="mw-imagepage-filesize">' . $this->skin->formatSize( $size ) . '</td>';
647
648 // Comment
649 $row .= '<td>' . $this->skin->formatComment( $description, $this->title ) . '</td>';
650
651 return "<tr>{$row}</tr>\n";
652 }
653
654 }