X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=img_auth.php;h=e139227eba69d8e29d9a373fd067b3e391ef7779;hb=59002d8935e48d1e6c0640b0f7102c9ff6dd2ef5;hp=391fb291b8b539a0eb47371e05cb5821b445dd4f;hpb=7a74e085d926a2a8bcb5d2ef1a703e3c72ca083a;p=lhc%2Fweb%2Fwiklou.git diff --git a/img_auth.php b/img_auth.php index 391fb291b8..e139227eba 100644 --- a/img_auth.php +++ b/img_auth.php @@ -150,6 +150,10 @@ function wfImageAuthMain() { return; } + if ( $wgRequest->getCheck( 'download' ) ) { + header( 'Content-Disposition: attachment' ); + } + // Stream the requested file wfDebugLog( 'img_auth', "Streaming `" . $filename . "`." ); $repo->streamFile( $filename, array( 'Cache-Control: private', 'Vary: Cookie' ) ); @@ -159,8 +163,8 @@ function wfImageAuthMain() { * Issue a standard HTTP 403 Forbidden header ($msg1-a message index, not a message) and an * error message ($msg2, also a message index), (both required) then end the script * subsequent arguments to $msg2 will be passed as parameters only for replacing in $msg2 - * @param $msg1 - * @param $msg2 + * @param string $msg1 + * @param string $msg2 */ function wfForbidden( $msg1, $msg2 ) { global $wgImgAuthDetails;