* Alternative to $wgHooks implemented, using the new Hooks class.
* Add width parameter to Special:Filepath to allow getting the file path of a thumbnail.
* (bug 26870) Add size to {{filepath:}}
+* Upload warnings now show a thumbnail of the uploaded file
=== Bug fixes in 1.18 ===
* (bug 23119) WikiError class and subclasses are now marked as deprecated
protected function getDescriptionSection() {
global $wgUser;
+ if ( $this->mSessionKey ) {
+ $stash = new UploadStash;
+ try {
+ $file = $stash->getFile( $this->mSessionKey );
+ } catch ( MWException $e ) {
+ $file = null;
+ }
+ if ( $file ) {
+ global $wgContLang;
+
+ $mto = $file->transform( array( 'width' => 120 ) );
+ $this->addHeaderText(
+ '<div class="thumb t' . $wgContLang->alignEnd() . '">' .
+ Html::element( 'img', array(
+ 'src' => $mto->getUrl(),
+ 'class' => 'thumbimage',
+ ) ) . '</div>', 'description' );
+ }
+ }
+
$descriptor = array(
'DestFile' => array(
'type' => 'text',