Merge "Less wild whitespace"
[lhc/web/wiklou.git] / includes / StreamFile.php
index e7f7811..b0e6c12 100644 (file)
@@ -35,6 +35,7 @@ class StreamFile {
         * @param $fname string Full name and path of the file to stream
         * @param $headers array Any additional headers to send
         * @param $sendErrors bool Send error messages if errors occur (like 404)
+        * @throws MWException
         * @return bool Success
         */
        public static function stream( $fname, $headers = array(), $sendErrors = true ) {
@@ -79,8 +80,6 @@ class StreamFile {
        public static function prepareForStream(
                $path, $info, $headers = array(), $sendErrors = true
        ) {
-               global $wgLanguageCode;
-
                if ( !is_array( $info ) ) {
                        if ( $sendErrors ) {
                                header( 'HTTP/1.0 404 Not Found' );
@@ -121,9 +120,6 @@ class StreamFile {
                        return false;
                }
 
-               header( "Content-Disposition: inline;filename*=utf-8'$wgLanguageCode'" .
-                       urlencode( basename( $path ) ) );
-
                // Send additional headers
                foreach ( $headers as $header ) {
                        header( $header );