protected $mForReUpload; // The user followed an "overwrite this file" link
protected $mCancelUpload; // The user clicked "Cancel and return to upload form" button
protected $mTokenOk;
+
+ /** Text injection points for hooks not using HTMLForm **/
+ public $uploadFormTextTop;
+ public $uploadFormTextAfterSummary;
+
/**
* Initialize instance variables from request and create an Upload handler
} else {
$this->mTokenOk = $wgUser->matchEditToken( $token );
}
+
+ $this->uploadFormTextTop = '';
+ $this->uploadFormTextAfterSummary = '';
}
/**
'sessionkey' => $sessionKey,
'hideignorewarning' => $hideIgnoreWarning,
'destwarningack' => (bool)$this->mDestWarningAck,
+
+ 'texttop' => $this->uploadFormTextTop,
+ 'textaftersummary' => $this->uploadFormTextAfterSummary,
) );
$form->setTitle( $this->getTitle() );
protected $mHideIgnoreWarning;
protected $mDestWarningAck;
+ protected $mTextTop;
+ protected $mTextAfterSummary;
+
protected $mSourceIds;
public function __construct( $options = array() ) {
? $options['sessionkey'] : '';
$this->mHideIgnoreWarning = !empty( $options['hideignorewarning'] );
$this->mDestWarningAck = !empty( $options['destwarningack'] );
+
+ $this->mTextTop = $options['texttop'];
+ $this->mTextAfterSummary = $options['textaftersummary'];
$sourceDescriptor = $this->getSourceSection();
$descriptor = $sourceDescriptor
$selectedSourceType = strtolower( $wgRequest->getText( 'wpSourceType', 'File' ) );
$descriptor = array();
+ if ( $this->mTextTop ) {
+ $descriptor['UploadFormTextTop'] = array(
+ 'type' => 'info',
+ 'section' => 'source',
+ 'default' => $this->mTextTop,
+ 'raw' => true,
+ );
+ }
+
$descriptor['UploadFile'] = array(
'class' => 'UploadSourceField',
'section' => 'source',
: 'fileuploadsummary',
'cols' => $cols,
'rows' => 8,
- ),
+ )
+ );
+ if ( $this->mTextAfterSummary ) {
+ $descriptor['UploadFormTextAfterSummary'] = array(
+ 'type' => 'info',
+ 'section' => 'description',
+ 'default' => $this->mTextAfterSummary,
+ 'raw' => true,
+ );
+ }
+
+ $descriptor += array(
'EditTools' => array(
'type' => 'edittools',
'section' => 'description',