use wfStreamFile() to output the captcha image; it takes care of removing the extra gzip compression and crap

This commit is contained in:
Brion Vibber 2007-02-20 08:30:14 +00:00
parent 985ccb6608
commit c89580f8f4

View file

@ -216,8 +216,9 @@ class FancyCaptcha extends SimpleCaptcha {
$file = $this->imagePath( $salt, $hash );
if( file_exists( $file ) ) {
header( 'Content-type: image/png' );
readfile( $file );
global $IP;
require_once "$IP/includes/StreamFile.php";
wfStreamFile( $file );
return true;
}
}