Merge "Adding debugging for bug 62241"
[lhc/web/wiklou.git] / img_auth.php
index 391fb29..a0976af 100644 (file)
@@ -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' ) );