header( "Content-Type: $contentType", true );
header( 'Content-Transfer-Encoding: binary', true );
header( 'Expires: Sun, 17-Jan-2038 19:14:07 GMT', true );
+ // Bug 53032 - It shouldn't be a problem here, but let's be safe and not cache
+ header( 'Cache-Control: private' );
header( "Content-Length: $size", true );
}
// create the form, which will also be used to execute a callback to process incoming form data
// this design is extremely dubious, but supposedly HTMLForm is our standard now?
+ $context = new DerivativeContext( $this->getContext() );
+ $context->setTitle( $this->getPageTitle() ); // Remove subpage
$form = new HTMLForm( array(
'Clear' => array(
'type' => 'hidden',
'default' => true,
'name' => 'clear',
)
- ), $this->getContext(), 'clearStashedUploads' );
+ ), $context, 'clearStashedUploads' );
$form->setSubmitCallback( array( __CLASS__, 'tryClearStashedUploads' ) );
- $form->setTitle( $this->getTitle() );
$form->setSubmitTextMsg( 'uploadstash-clear' );
$form->prepareForm();
// show the files + form, if there are any, or just say there are none
$refreshHtml = Html::element( 'a',
- array( 'href' => $this->getTitle()->getLocalURL() ),
+ array( 'href' => $this->getPageTitle()->getLocalURL() ),
$this->msg( 'uploadstash-refresh' )->text() );
$files = $this->stash->listFiles();
if ( $files && count( $files ) ) {
// TODO: Use Linker::link or even construct the list in plain wikitext
$fileListItemsHtml .= Html::rawElement( 'li', array(),
Html::element( 'a', array( 'href' =>
- $this->getTitle( "file/$file" )->getLocalURL() ), $file )
+ $this->getPageTitle( "file/$file" )->getLocalURL() ), $file )
);
}
$this->getOutput()->addHtml( Html::rawElement( 'ul', array(), $fileListItemsHtml ) );