Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -938,6 +938,26 @@ |
939 | 939 | protected function getDescriptionSection() { |
940 | 940 | global $wgUser; |
941 | 941 | |
| 942 | + if ( $this->mSessionKey ) { |
| 943 | + $stash = new UploadStash; |
| 944 | + try { |
| 945 | + $file = $stash->getFile( $this->mSessionKey ); |
| 946 | + } catch ( MWException $e ) { |
| 947 | + $file = null; |
| 948 | + } |
| 949 | + if ( $file ) { |
| 950 | + global $wgContLang; |
| 951 | + |
| 952 | + $mto = $file->transform( array( 'width' => 120 ) ); |
| 953 | + $this->addHeaderText( |
| 954 | + '<div class="thumb t' . $wgContLang->alignEnd() . '">' . |
| 955 | + Html::element( 'img', array( |
| 956 | + 'src' => $mto->getUrl(), |
| 957 | + 'class' => 'thumbimage', |
| 958 | + ) ) . '</div>', 'description' ); |
| 959 | + } |
| 960 | + } |
| 961 | + |
942 | 962 | $descriptor = array( |
943 | 963 | 'DestFile' => array( |
944 | 964 | 'type' => 'text', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -52,6 +52,7 @@ |
53 | 53 | * Alternative to $wgHooks implemented, using the new Hooks class. |
54 | 54 | * Add width parameter to Special:Filepath to allow getting the file path of a thumbnail. |
55 | 55 | * (bug 26870) Add size to {{filepath:}} |
| 56 | +* Upload warnings now show a thumbnail of the uploaded file |
56 | 57 | |
57 | 58 | === Bug fixes in 1.18 === |
58 | 59 | * (bug 23119) WikiError class and subclasses are now marked as deprecated |