8 if( !defined( 'MEDIAWIKI' ) )
12 * Special handling for image description pages
16 class ImagePage
extends Article
{
18 /* private */ var $img; // Image object this page is shown for
19 /* private */ var $repo;
20 var $mExtraDescription = false;
22 function __construct( $title, $time = false ) {
23 parent
::__construct( $title );
24 $this->img
= wfFindFile( $this->mTitle
, $time );
26 $this->img
= wfLocalFile( $this->mTitle
);
27 $this->current
= $this->img
;
29 $this->current
= $time ?
wfLocalFile( $this->mTitle
) : $this->img
;
31 $this->repo
= $this->img
->repo
;
35 * Handler for action=render
36 * Include body text only; none of the image extras
40 $wgOut->setArticleBodyOnly( true );
45 global $wgOut, $wgShowEXIF, $wgRequest, $wgUser;
47 $diff = $wgRequest->getVal( 'diff' );
48 $diffOnly = $wgRequest->getBool( 'diffonly', $wgUser->getOption( 'diffonly' ) );
50 if ( $this->mTitle
->getNamespace() != NS_IMAGE ||
( isset( $diff ) && $diffOnly ) )
51 return Article
::view();
53 if ($wgShowEXIF && $this->img
->exists()) {
54 // FIXME: bad interface, see note on MediaHandler::formatMetadata().
55 $formattedMetadata = $this->img
->formatMetadata();
56 $showmeta = $formattedMetadata !== false;
61 if ($this->img
->exists())
62 $wgOut->addHTML($this->showTOC($showmeta));
64 $this->openShowImage();
66 # No need to display noarticletext, we use our own message, output in openShowImage()
67 if ( $this->getID() ) {
70 # Just need to set the right headers
71 $wgOut->setArticleFlag( true );
72 $wgOut->setRobotpolicy( 'noindex,nofollow' );
73 $wgOut->setPageTitle( $this->mTitle
->getPrefixedText() );
77 # Show shared description, if needed
78 if ( $this->mExtraDescription
) {
79 $fol = wfMsgNoTrans( 'shareddescriptionfollows' );
80 if( $fol != '-' && !wfEmptyMsg( 'shareddescriptionfollows', $fol ) ) {
81 $wgOut->addWikiText( $fol );
83 $wgOut->addHTML( '<div id="shared-image-desc">' . $this->mExtraDescription
. '</div>' );
85 $this->checkSharedConflict();
88 $this->closeShowImage();
89 $this->imageHistory();
93 global $wgStylePath, $wgStyleVersion;
94 $expand = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-expand' ) ) );
95 $collapse = htmlspecialchars( wfEscapeJsString( wfMsg( 'metadata-collapse' ) ) );
96 $wgOut->addHTML( Xml
::element( 'h2', array( 'id' => 'metadata' ), wfMsg( 'metadata' ) ). "\n" );
97 $wgOut->addWikiText( $this->makeMetadataTable( $formattedMetadata ) );
99 "<script type=\"text/javascript\" src=\"$wgStylePath/common/metadata.js?$wgStyleVersion\"></script>\n" .
100 "<script type=\"text/javascript\">attachMetadataToggle('mw_metadata', '$expand', '$collapse');</script>\n" );
109 * @param bool $metadata Whether or not to show the metadata link
112 function showTOC( $metadata ) {
114 $r = '<ul id="filetoc">
115 <li><a href="#file">' . $wgLang->getNsText( NS_IMAGE
) . '</a></li>
116 <li><a href="#filehistory">' . wfMsgHtml( 'filehist' ) . '</a></li>
117 <li><a href="#filelinks">' . wfMsgHtml( 'imagelinks' ) . '</a></li>' .
118 ($metadata ?
' <li><a href="#metadata">' . wfMsgHtml( 'metadata' ) . '</a></li>' : '') . '
124 * Make a table with metadata to be shown in the output page.
126 * FIXME: bad interface, see note on MediaHandler::formatMetadata().
130 * @param array $exif The array containing the EXIF data
133 function makeMetadataTable( $metadata ) {
134 $r = wfMsg( 'metadata-help' ) . "\n\n";
135 $r .= "{| id=mw_metadata class=mw_metadata\n";
136 foreach ( $metadata as $type => $stuff ) {
137 foreach ( $stuff as $v ) {
138 $class = Sanitizer
::escapeId( $v['id'] );
139 if( $type == 'collapsed' ) {
140 $class .= ' collapsable';
142 $r .= "|- class=\"$class\"\n";
143 $r .= "!| {$v['name']}\n";
144 $r .= "|| {$v['value']}\n";
152 * Overloading Article's getContent method.
154 * Omit noarticletext if sharedupload; text will be fetched from the
155 * shared upload server if possible.
157 function getContent() {
158 if( $this->img
&& !$this->img
->isLocal() && 0 == $this->getID() ) {
161 return Article
::getContent();
164 function openShowImage() {
165 global $wgOut, $wgUser, $wgImageLimits, $wgRequest, $wgLang, $wgContLang;
167 $full_url = $this->img
->getURL();
168 $linkAttribs = false;
169 $sizeSel = intval( $wgUser->getOption( 'imagesize') );
170 if( !isset( $wgImageLimits[$sizeSel] ) ) {
171 $sizeSel = User
::getDefaultOption( 'imagesize' );
173 // The user offset might still be incorrect, specially if
174 // $wgImageLimits got changed (see bug #8858).
175 if( !isset( $wgImageLimits[$sizeSel] ) ) {
176 // Default to the first offset in $wgImageLimits
180 $max = $wgImageLimits[$sizeSel];
182 $maxHeight = $max[1];
183 $sk = $wgUser->getSkin();
184 $dirmark = $wgContLang->getDirMark();
186 if ( $this->img
->exists() ) {
188 $page = $wgRequest->getIntOrNull( 'page' );
189 if ( is_null( $page ) ) {
193 $params = array( 'page' => $page );
195 $width_orig = $this->img
->getWidth();
196 $width = $width_orig;
197 $height_orig = $this->img
->getHeight();
198 $height = $height_orig;
199 $mime = $this->img
->getMimeType();
201 $linkAttribs = array( 'href' => $full_url );
202 $longDesc = $this->img
->getLongDesc();
204 wfRunHooks( 'ImageOpenShowImageInlineBefore', array( &$this , &$wgOut ) ) ;
206 if ( $this->img
->allowInlineDisplay() ) {
209 # "Download high res version" link below the image
210 #$msgsize = wfMsgHtml('file-info-size', $width_orig, $height_orig, $sk->formatSize( $this->img->getSize() ), $mime );
211 # We'll show a thumbnail of this image
212 if ( $width > $maxWidth ||
$height > $maxHeight ) {
213 # Calculate the thumbnail size.
214 # First case, the limiting factor is the width, not the height.
215 if ( $width / $height >= $maxWidth / $maxHeight ) {
216 $height = round( $height * $maxWidth / $width);
218 # Note that $height <= $maxHeight now.
220 $newwidth = floor( $width * $maxHeight / $height);
221 $height = round( $height * $newwidth / $width );
223 # Note that $height <= $maxHeight now, but might not be identical
224 # because of rounding.
226 $msgbig = wfMsgHtml( 'show-big-image' );
227 $msgsmall = wfMsgExt( 'show-big-image-thumb',
228 array( 'parseinline' ), $wgLang->formatNum( $width ), $wgLang->formatNum( $height ) );
230 # Image is small enough to show full size on image page
231 $msgbig = htmlspecialchars( $this->img
->getName() );
232 $msgsmall = wfMsgExt( 'file-nohires', array( 'parseinline' ) );
235 $params['width'] = $width;
236 $thumbnail = $this->img
->transform( $params );
238 $anchorclose = "<br />";
239 if( $this->img
->mustRender() ) {
244 '<br />' . Xml
::tags( 'a', $linkAttribs, $msgbig ) . "$dirmark " . $longDesc;
247 if ( $this->img
->isMultipage() ) {
248 $wgOut->addHTML( '<table class="multipageimage"><tr><td>' );
253 'alt' => $this->img
->getTitle()->getPrefixedText(),
256 $wgOut->addHTML( '<div class="fullImageLink" id="file">' .
257 $thumbnail->toHtml( $options ) .
258 $anchorclose . '</div>' );
261 if ( $this->img
->isMultipage() ) {
262 $count = $this->img
->pageCount();
265 $label = $wgOut->parse( wfMsg( 'imgmultipageprev' ), false );
266 $link = $sk->makeKnownLinkObj( $this->mTitle
, $label, 'page='. ($page-1) );
267 $thumb1 = $sk->makeThumbLinkObj( $this->mTitle
, $this->img
, $link, $label, 'none',
268 array( 'page' => $page - 1 ) );
273 if ( $page < $count ) {
274 $label = wfMsg( 'imgmultipagenext' );
275 $link = $sk->makeKnownLinkObj( $this->mTitle
, $label, 'page='. ($page+
1) );
276 $thumb2 = $sk->makeThumbLinkObj( $this->mTitle
, $this->img
, $link, $label, 'none',
277 array( 'page' => $page +
1 ) );
283 $select = '<form name="pageselector" action="' .
284 htmlspecialchars( $wgScript ) .
285 '" method="get" onchange="document.pageselector.submit();">' .
286 Xml
::hidden( 'title', $this->getTitle()->getPrefixedDbKey() );
287 $select .= $wgOut->parse( wfMsg( 'imgmultigotopre' ), false ) .
288 ' <select id="pageselector" name="page">';
289 for ( $i=1; $i <= $count; $i++
) {
290 $select .= Xml
::option( $wgLang->formatNum( $i ), $i,
293 $select .= '</select>' . $wgOut->parse( wfMsg( 'imgmultigotopost' ), false ) .
294 '<input type="submit" value="' .
295 htmlspecialchars( wfMsg( 'imgmultigo' ) ) . '"></form>';
297 $wgOut->addHTML( '</td><td><div class="multipageimagenavbox">' .
298 "$select<hr />$thumb1\n$thumb2<br clear=\"all\" /></div></td></tr></table>" );
301 #if direct link is allowed but it's not a renderable image, show an icon.
302 if ($this->img
->isSafeFile()) {
303 $icon= $this->img
->iconThumb();
305 $wgOut->addHTML( '<div class="fullImageLink" id="file">' .
306 $icon->toHtml( array( 'desc-link' => true ) ) .
315 $filename = wfEscapeWikiText( $this->img
->getName() );
317 if (!$this->img
->isSafeFile()) {
318 $warning = wfMsgNoTrans( 'mediawarning' );
319 $wgOut->addWikiText( <<<EOT
320 <div class="fullMedia">
321 <span class="dangerousLink">[[Media:$filename|$filename]]</span>$dirmark
322 <span class="fileInfo"> $longDesc</span>
325 <div class="mediaWarning">$warning</div>
329 $wgOut->addWikiText( <<<EOT
330 <div class="fullMedia">
331 [[Media:$filename|$filename]]$dirmark <span class="fileInfo"> $longDesc</span>
338 if(!$this->img
->isLocal()) {
339 $this->printSharedImageText();
342 # Image does not exist
344 $title = SpecialPage
::getTitleFor( 'Upload' );
345 $link = $sk->makeKnownLinkObj($title, wfMsgHtml('noimage-linktext'),
346 'wpDestFile=' . urlencode( $this->img
->getName() ) );
347 $wgOut->addHTML( wfMsgWikiHtml( 'noimage', $link ) );
352 * Show a notice that the file is from a shared repository
354 function printSharedImageText() {
355 global $wgOut, $wgUser;
357 $descUrl = $this->img
->getDescriptionUrl();
358 $descText = $this->img
->getDescriptionText();
359 $s = "<div class='sharedUploadNotice'>" . wfMsgWikiHtml( 'sharedupload' );
361 $sk = $wgUser->getSkin();
362 $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadwiki-linktext' ) );
363 $msg = ( $descText ) ?
'shareduploadwiki-desc' : 'shareduploadwiki';
364 $msg = wfMsgExt( $msg, array( 'parseinline', 'replaceafter' ), $link );
366 # Show message only if not voided by local sysops
371 $wgOut->addHTML( $s );
374 $this->mExtraDescription
= $descText;
378 function checkSharedConflict() {
379 global $wgOut, $wgUser;
380 $repoGroup = RepoGroup
::singleton();
381 if( !$repoGroup->hasForeignRepos() ) {
384 if( !$this->img
->isLocal() ) {
388 $this->dupFile
= null;
389 $repoGroup->forEachForeignRepo( array( $this, 'checkSharedConflictCallback' ) );
391 if( !$this->dupFile
)
393 $dupfile = $this->dupFile
;
395 ($this->img
->getSha1() == $dupfile->getSha1()) &&
396 ($this->img
->getSize() == $dupfile->getSize())
399 $sk = $wgUser->getSkin();
400 $descUrl = $dupfile->getDescriptionUrl();
402 $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadduplicate-linktext' ) );
403 $wgOut->addHTML( '<div id="shared-image-dup">' . wfMsgWikiHtml( 'shareduploadduplicate', $link ) . '</div>' );
405 $link = $sk->makeExternalLink( $descUrl, wfMsg( 'shareduploadconflict-linktext' ) );
406 $wgOut->addHTML( '<div id="shared-image-conflict">' . wfMsgWikiHtml( 'shareduploadconflict', $link ) . '</div>' );
410 function checkSharedConflictCallback( $repo ) {
411 $dupfile = $repo->newFile( $this->img
->getTitle() );
412 if( $dupfile->exists() )
413 $this->dupFile
= $dupfile;
414 return $dupfile->exists();
417 function getUploadUrl() {
418 $uploadTitle = SpecialPage
::getTitleFor( 'Upload' );
419 return $uploadTitle->getFullUrl( 'wpDestFile=' . urlencode( $this->img
->getName() ) );
423 * Print out the various links at the bottom of the image page, e.g. reupload,
424 * external editing (and instructions link) etc.
426 function uploadLinksBox() {
427 global $wgUser, $wgOut;
429 if( !$this->img
->isLocal() )
432 $sk = $wgUser->getSkin();
434 $wgOut->addHtml( '<br /><ul>' );
436 # "Upload a new version of this file" link
437 if( UploadForm
::userCanReUpload($wgUser,$this->img
->name
) ) {
438 $ulink = $sk->makeExternalLink( $this->getUploadUrl(), wfMsg( 'uploadnewversion-linktext' ) );
439 $wgOut->addHtml( "<li><div class='plainlinks'>{$ulink}</div></li>" );
442 # Link to Special:FileDuplicateSearch
443 $dupeLink = $sk->makeKnownLinkObj( SpecialPage
::getTitleFor( 'FileDuplicateSearch', $this->mTitle
->getDBkey() ), wfMsgHtml( 'imagepage-searchdupe' ) );
444 $wgOut->addHtml( "<li>{$dupeLink}</li>" );
446 # External editing link
447 $elink = $sk->makeKnownLinkObj( $this->mTitle
, wfMsgHtml( 'edit-externally' ), 'action=edit&externaledit=true&mode=file' );
448 $wgOut->addHtml( '<li>' . $elink . '<div>' . wfMsgWikiHtml( 'edit-externally-help' ) . '</div></li>' );
450 $wgOut->addHtml( '</ul>' );
453 function closeShowImage()
460 * If the page we've just displayed is in the "Image" namespace,
461 * we follow it with an upload history of the image and its usage.
463 function imageHistory()
465 global $wgUser, $wgOut, $wgUseExternalEditor;
467 $sk = $wgUser->getSkin();
469 if ( $this->img
->exists() ) {
470 $list = new ImageHistoryList( $sk, $this->current
);
471 $file = $this->current
;
472 $dims = $file->getDimensionsString();
473 $s = $list->beginImageHistoryList() .
474 $list->imageHistoryLine( true, $file );
475 // old image versions
476 $hist = $this->img
->getHistory();
477 foreach( $hist as $file ) {
478 $dims = $file->getDimensionsString();
479 $s .= $list->imageHistoryLine( false, $file );
481 $s .= $list->endImageHistoryList();
483 $wgOut->addHTML( $s );
485 $this->img
->resetHistory(); // free db resources
487 # Exist check because we don't want to show this on pages where an image
488 # doesn't exist along with the noimage message, that would suck. -ævar
489 if( $wgUseExternalEditor && $this->img
->exists() ) {
490 $this->uploadLinksBox();
495 function imageLinks()
497 global $wgUser, $wgOut;
499 $wgOut->addHTML( Xml
::element( 'h2', array( 'id' => 'filelinks' ), wfMsg( 'imagelinks' ) ) . "\n" );
501 $dbr = wfGetDB( DB_SLAVE
);
502 $page = $dbr->tableName( 'page' );
503 $imagelinks = $dbr->tableName( 'imagelinks' );
505 $sql = "SELECT page_namespace,page_title FROM $imagelinks,$page WHERE il_to=" .
506 $dbr->addQuotes( $this->mTitle
->getDBkey() ) . " AND il_from=page_id";
507 $sql = $dbr->limitResult($sql, 500, 0);
508 $res = $dbr->query( $sql, "ImagePage::imageLinks" );
510 if ( 0 == $dbr->numRows( $res ) ) {
511 $wgOut->addHtml( '<p>' . wfMsg( "nolinkstoimage" ) . "</p>\n" );
514 $wgOut->addHTML( '<p>' . wfMsg( 'linkstoimage' ) . "</p>\n<ul>" );
516 $sk = $wgUser->getSkin();
517 while ( $s = $dbr->fetchObject( $res ) ) {
518 $name = Title
::MakeTitle( $s->page_namespace
, $s->page_title
);
519 $link = $sk->makeKnownLinkObj( $name, "" );
520 $wgOut->addHTML( "<li>{$link}</li>\n" );
522 $wgOut->addHTML( "</ul>\n" );
526 * Delete the file, or an earlier version of it
528 public function delete() {
529 if( !$this->img
->exists() ||
!$this->img
->isLocal() ) {
530 // Standard article deletion
534 $deleter = new FileDeleteForm( $this->img
);
539 * Revert the file to an earlier version
541 public function revert() {
542 $reverter = new FileRevertForm( $this->img
);
543 $reverter->execute();
547 * Override handling of action=purge
550 if( $this->img
->exists() ) {
551 wfDebug( "ImagePage::doPurge purging " . $this->img
->getName() . "\n" );
552 $update = new HTMLCacheUpdate( $this->mTitle
, 'imagelinks' );
554 $this->img
->upgradeRow();
555 $this->img
->purgeCache();
557 wfDebug( "ImagePage::doPurge no image\n" );
563 * Display an error with a wikitext description
565 function showError( $description ) {
567 $wgOut->setPageTitle( wfMsg( "internalerror" ) );
568 $wgOut->setRobotpolicy( "noindex,nofollow" );
569 $wgOut->setArticleRelated( false );
570 $wgOut->enableClientCache( false );
571 $wgOut->addWikiText( $description );
577 * Builds the image revision log shown on image pages
581 class ImageHistoryList
{
583 protected $img, $skin, $title, $repo;
585 public function __construct( $skin, $img ) {
588 $this->title
= $img->getTitle();
591 public function beginImageHistoryList() {
592 global $wgOut, $wgUser;
593 $deleteColumn = $wgUser->isAllowed( 'delete' ) ||
$wgUser->isAllowed( 'deleterevision' );
594 return Xml
::element( 'h2', array( 'id' => 'filehistory' ), wfMsg( 'filehist' ) )
595 . $wgOut->parse( wfMsgNoTrans( 'filehist-help' ) )
596 . Xml
::openElement( 'table', array( 'class' => 'filehistory' ) ) . "\n"
598 . ( $this->img
->isLocal() && $deleteColumn ?
'<td></td>' : '' )
599 . '<th>' . wfMsgHtml( 'filehist-datetime' ) . '</th>'
600 . '<th>' . wfMsgHtml( 'filehist-user' ) . '</th>'
601 . '<th>' . wfMsgHtml( 'filehist-dimensions' ) . '</th>'
602 . '<th class="mw-imagepage-filesize">' . wfMsgHtml( 'filehist-filesize' ) . '</th>'
603 . '<th>' . wfMsgHtml( 'filehist-comment' ) . '</th>'
607 public function endImageHistoryList() {
611 public function imageHistoryLine( $iscur, $file ) {
612 global $wgUser, $wgLang, $wgContLang, $wgTitle;
614 $timestamp = wfTimestamp(TS_MW
, $file->getTimestamp());
615 $img = $iscur ?
$file->getName() : $file->getArchiveName();
616 $user = $file->getUser('id');
617 $usertext = $file->getUser('text');
618 $size = $file->getSize();
619 $description = $file->getDescription();
620 $dims = $file->getDimensionsString();
621 $sha1 = $file->getSha1();
623 $local = $this->img
->isLocal();
627 if( $local && ($wgUser->isAllowed('delete') ||
$wgUser->isAllowed('deleterevision') ) ) {
629 # Link to remove from history
630 if( $wgUser->isAllowed( 'delete' ) ) {
632 $q[] = 'action=delete';
634 $q[] = 'oldimage=' . urlencode( $img );
635 $row .= $this->skin
->makeKnownLinkObj(
637 wfMsgHtml( $iscur ?
'filehist-deleteall' : 'filehist-deleteone' ),
642 # Link to hide content
643 if( $wgUser->isAllowed( 'deleterevision' ) ) {
644 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
645 // If file is top revision or locked from this user, don't link
646 if( $iscur ||
!$file->userCan(File
::DELETED_RESTRICTED
) ) {
647 $del = wfMsgHtml( 'rev-delundel' );
649 // If the file was hidden, link to sha-1
650 list($ts,$name) = explode('!',$img,2);
651 $del = $this->skin
->makeKnownLinkObj( $revdel, wfMsg( 'rev-delundel' ),
652 'target=' . urlencode( $wgTitle->getPrefixedText() ) .
653 '&oldimage=' . urlencode( $ts ) );
654 // Bolden oversighted content
655 if( $file->isDeleted(File
::DELETED_RESTRICTED
) )
656 $del = "<strong>$del</strong>";
658 $row .= "<tt><small>$del</small></tt>";
663 // Reversion link/current indicator
666 $row .= wfMsgHtml( 'filehist-current' );
667 } elseif( $local && $wgUser->isLoggedIn() && $this->title
->userCan( 'edit' ) ) {
668 if( $file->isDeleted(File
::DELETED_FILE
) ) {
669 $row .= wfMsgHtml('filehist-revert');
672 $q[] = 'action=revert';
673 $q[] = 'oldimage=' . urlencode( $img );
674 $q[] = 'wpEditToken=' . urlencode( $wgUser->editToken( $img ) );
675 $row .= $this->skin
->makeKnownLinkObj( $this->title
,
676 wfMsgHtml( 'filehist-revert' ),
677 implode( '&', $q ) );
682 // Date/time and image link
684 if( !$file->userCan(File
::DELETED_FILE
) ) {
685 # Don't link to unviewable files
686 $row .= '<span class="history-deleted">' . $wgLang->timeAndDate( $timestamp, true ) . '</span>';
687 } else if( $file->isDeleted(File
::DELETED_FILE
) ) {
688 $revdel = SpecialPage
::getTitleFor( 'Revisiondelete' );
689 # Make a link to review the image
690 $url = $this->skin
->makeKnownLinkObj( $revdel, $wgLang->timeAndDate( $timestamp, true ),
691 "target=".$wgTitle->getPrefixedText()."&file=$sha1.".$this->img
->getExtension() );
692 $row .= '<span class="history-deleted">'.$url.'</span>';
694 $url = $iscur ?
$this->img
->getUrl() : $this->img
->getArchiveUrl( $img );
695 $row .= Xml
::element( 'a',
696 array( 'href' => $url ),
697 $wgLang->timeAndDate( $timestamp, true ) );
705 // Hide deleted usernames
706 if( $file->isDeleted(File
::DELETED_USER
) )
707 $row .= '<span class="history-deleted">' . wfMsgHtml( 'rev-deleted-user' ) . '</span>';
709 $row .= $this->skin
->userLink( $user, $usertext ) .
710 $this->skin
->userToolLinks( $user, $usertext );
712 $row .= htmlspecialchars( $usertext );
717 $row .= '<td>' . htmlspecialchars( $dims ) . '</td>';
720 $row .= '<td class="mw-imagepage-filesize">' . $this->skin
->formatSize( $size ) . '</td>';
722 // Don't show deleted descriptions
723 if ( $file->isDeleted(File
::DELETED_COMMENT
) )
724 $row .= '<td><span class="history-deleted">' . wfMsgHtml('rev-deleted-comment') . '</span></td>';
726 $row .= '<td>' . $this->skin
->commentBlock( $description, $this->title
) . '</td>';
728 return "<tr>{$row}</tr>\n";