if ( $size > self::MAX_SERVE_BYTES ) {
throw new SpecialUploadStashTooLargeException();
}
+ // Cancel output buffering and gzipping if set
+ wfResetOutputBuffers();
self::outputFileHeaders( $contentType, $size );
print $content;
$context = new DerivativeContext( $this->getContext() );
$context->setTitle( $this->getPageTitle() ); // Remove subpage
- $form = new HTMLForm( [
+ $form = HTMLForm::factory( 'ooui', [
'Clear' => [
'type' => 'hidden',
'default' => true,
'name' => 'clear',
]
], $context, 'clearStashedUploads' );
+ $form->setSubmitDestructive();
$form->setSubmitCallback( [ __CLASS__, 'tryClearStashedUploads' ] );
$form->setSubmitTextMsg( 'uploadstash-clear' );