class SpecialUpload extends SpecialPage {
/**
* Get data POSTed through the form and assign them to the object
- * @param WebRequest $request Data posted.
+ * @param WebRequest|null $request Data posted.
*/
public function __construct( $request = null ) {
parent::__construct( 'Upload', 'upload' );
}
// Add styles for the warning, reused from the live preview
- $this->getOutput()->addModuleStyles( 'mediawiki.special.upload.styles' );
+ $this->getOutput()->addModuleStyles( 'mediawiki.special' );
$linkRenderer = $this->getLinkRenderer();
$warningHtml = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n"
* @param string $license
* @param string $copyStatus
* @param string $source
- * @param Config $config Configuration object to load data from
+ * @param Config|null $config Configuration object to load data from
* @return string
*/
public static function getInitialPageText( $comment = '', $license = '',
}
$success = $this->mUpload->unsaveUploadedFile();
if ( !$success ) {
- $this->getOutput()->showFileDeleteError( $this->mUpload->getTempPath() );
+ $this->getOutput()->showFatalError(
+ $this->msg( 'filedeleteerror' )
+ ->params( $this->mUpload->getTempPath() )
+ ->escaped()
+ );
return false;
} else {