summaryrefslogtreecommitdiff
path: root/includes/StreamFile.php
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:32:59 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-05-01 15:32:59 -0400
commit6dc1997577fab2c366781fd7048144935afa0012 (patch)
tree8918d28c7ab4342f0738985e37af1dfc42d0e93a /includes/StreamFile.php
parent150f94f051128f367bc89f6b7e5f57eb2a69fc62 (diff)
parentfa89acd685cb09cdbe1c64cbb721ec64975bbbc1 (diff)
Merge commit 'fa89acd'
# Conflicts: # .gitignore # extensions/ArchInterWiki.sql
Diffstat (limited to 'includes/StreamFile.php')
-rw-r--r--includes/StreamFile.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/StreamFile.php b/includes/StreamFile.php
index a52b25b0..3f73ae3c 100644
--- a/includes/StreamFile.php
+++ b/includes/StreamFile.php
@@ -44,9 +44,9 @@ class StreamFile {
throw new MWException( __FUNCTION__ . " given storage path '$fname'." );
}
- wfSuppressWarnings();
+ MediaWiki\suppressWarnings();
$stat = stat( $fname );
- wfRestoreWarnings();
+ MediaWiki\restoreWarnings();
$res = self::prepareForStream( $fname, $stat, $headers, $sendErrors );
if ( $res == self::NOT_MODIFIED ) {
@@ -78,7 +78,7 @@ class StreamFile {
) {
if ( !is_array( $info ) ) {
if ( $sendErrors ) {
- header( 'HTTP/1.0 404 Not Found' );
+ HttpStatus::header( 404 );
header( 'Cache-Control: no-cache' );
header( 'Content-Type: text/html; charset=utf-8' );
$encFile = htmlspecialchars( $path );
@@ -126,7 +126,7 @@ class StreamFile {
$modsince = preg_replace( '/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE'] );
if ( wfTimestamp( TS_UNIX, $info['mtime'] ) <= strtotime( $modsince ) ) {
ini_set( 'zlib.output_compression', 0 );
- header( "HTTP/1.0 304 Not Modified" );
+ HttpStatus::header( 304 );
return self::NOT_MODIFIED; // ok
}
}