Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1424,7 +1424,18 @@ |
1425 | 1425 | wfProfileOut( $fname ); |
1426 | 1426 | return $previewhead; |
1427 | 1427 | } else { |
1428 | | - $toparse = $this->textbox1; |
| 1428 | + # If an image description page is edited, show a thumbnail at time of edit preview |
| 1429 | + # <gallery> format used as it handles all non image files (.ogg, .pdf, ...) very nice. |
| 1430 | + if ( $wgTitle->mNamespace == NS_IMAGE ) { |
| 1431 | + global $wgContLang; |
| 1432 | + $align = $wgContLang->isRtl() ? 'left' : 'right'; |
| 1433 | + $imageLink = "<div class=\"mw-image-edit-preview\" style=\"float:$align\"><gallery>" . |
| 1434 | + $wgTitle->mPrefixedText. "|" . $wgTitle->mPrefixedText . |
| 1435 | + "</gallery></div>\n"; |
| 1436 | + $toparse = $imageLink . $this->textbox1; |
| 1437 | + } else { |
| 1438 | + $toparse = $this->textbox1; |
| 1439 | + } |
1429 | 1440 | |
1430 | 1441 | # If we're adding a comment, we need to show the |
1431 | 1442 | # summary as the headline |
— | — | @@ -2086,5 +2097,3 @@ |
2087 | 2098 | } |
2088 | 2099 | |
2089 | 2100 | } |
2090 | | - |
2091 | | - |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -22,6 +22,7 @@ |
23 | 23 | |
24 | 24 | === New features in 1.12 === |
25 | 25 | * Add a warning for non-descriptive filenames at Special:Upload |
| 26 | +* (bug 11243) Show thumbnail on image description page previews |
26 | 27 | |
27 | 28 | === Bug fixes in 1.12 === |
28 | 29 | |