Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/319595
Change subject: Use MW function to generate Content-Disposition header ...................................................................... Use MW function to generate Content-Disposition header Bug: T149773 Change-Id: Ie1c151652dfde6b9680a281d385de8cdd03fff5b --- M specials/SpecialElectronPdf.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ElectronPdfService refs/changes/95/319595/1 diff --git a/specials/SpecialElectronPdf.php b/specials/SpecialElectronPdf.php index 53b93d4..292e523 100644 --- a/specials/SpecialElectronPdf.php +++ b/specials/SpecialElectronPdf.php @@ -140,7 +140,7 @@ $request->setCallback( [ $this, 'writeToTempFile' ] ); if ( $request->execute()->isOK() ) { - $this->sendPdfToOutput( $title->getText() ); + $this->sendPdfToOutput( $title->getPrefixedText() ); } else { $this->getOutput()->showErrorPage( 'electronPdfService-page-notfound-title', @@ -196,7 +196,7 @@ wfResetOutputBuffers(); header( 'Content-Type:application/pdf' ); header( 'Content-Length: ' . filesize( $fileMetaData['uri'] ) ); - header( 'Content-Disposition: inline; filename=' . $page . '.pdf' ); + header( FileBackend::makeContentDisposition( 'inline', $page ) ); fseek( $this->tempFileHandle, 0 ); fpassthru( $this->tempFileHandle ); $this->getOutput()->disable(); -- To view, visit https://gerrit.wikimedia.org/r/319595 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie1c151652dfde6b9680a281d385de8cdd03fff5b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/ElectronPdfService Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits