$wgTrivialMimeDetection = true; //don't use fancy mime detection, just check the file extension for jpg/gif/png.
-require_once( "$IP/includes/StreamFile.php" );
-
wfThumbMain();
wfLogProfilingData();
$thumbPath = $img->getThumbPath( $thumbName );
if ( is_file( $thumbPath ) ) {
- wfStreamFile( $thumbPath, $headers );
+ StreamFile::stream( $thumbPath, $headers );
wfProfileOut( __METHOD__ );
return;
}
$errorMsg = wfMsgHtml( 'thumbnail_error', 'Image was not scaled, ' .
'is the requested width bigger than the source?' );
} else {
- wfStreamFile( $thumb->getPath(), $headers );
+ StreamFile::stream( $thumb->getPath(), $headers );
}
if ( $errorMsg !== false ) {
wfThumbError( 500, $errorMsg );