Merge "Add fastcgi_finish_request where appropriate"
[lhc/web/wiklou.git] / includes / specials / SpecialUploadStash.php
index 87b6442..37bfa39 100644 (file)
@@ -308,6 +308,8 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                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 );
        }
 
@@ -344,7 +346,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                // this design is extremely dubious, but supposedly HTMLForm is our standard now?
 
                $context = new DerivativeContext( $this->getContext() );
-               $context->setTitle( $this->getTitle() ); // Remove subpage
+               $context->setTitle( $this->getPageTitle() ); // Remove subpage
                $form = new HTMLForm( array(
                        'Clear' => array(
                                'type' => 'hidden',
@@ -360,7 +362,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
 
                // 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 ) ) {
@@ -370,7 +372,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                                // 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 ) );