From: Raimond Spekking Date: Wed, 12 Sep 2007 18:36:24 +0000 (+0000) Subject: * (bug 11243) Show thumbnail on image description page previews X-Git-Tag: 1.31.0-rc.0~51405 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=9a47180458d3b7ce4bf77615a241bdfee2f9c393;p=lhc%2Fweb%2Fwiklou.git * (bug 11243) Show thumbnail on image description page previews --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 23f5f636d7..bb8b3a4c8d 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -22,6 +22,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN === New features in 1.12 === * Add a warning for non-descriptive filenames at Special:Upload +* (bug 11243) Show thumbnail on image description page previews === Bug fixes in 1.12 === diff --git a/includes/EditPage.php b/includes/EditPage.php index e878617968..e9ae57315d 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1424,7 +1424,18 @@ END wfProfileOut( $fname ); return $previewhead; } else { - $toparse = $this->textbox1; + # If an image description page is edited, show a thumbnail at time of edit preview + # format used as it handles all non image files (.ogg, .pdf, ...) very nice. + if ( $wgTitle->mNamespace == NS_IMAGE ) { + global $wgContLang; + $align = $wgContLang->isRtl() ? 'left' : 'right'; + $imageLink = "
" . + $wgTitle->mPrefixedText. "|" . $wgTitle->mPrefixedText . + "
\n"; + $toparse = $imageLink . $this->textbox1; + } else { + $toparse = $this->textbox1; + } # If we're adding a comment, we need to show the # summary as the headline @@ -2086,5 +2097,3 @@ END } } - -