= filemtime( $imagePath ) ) { wfStreamFile( $thumbPath ); exit; } // OK, no valid thumbnail, time to get out the heavy machinery require_once( 'Setup.php' ); wfProfileIn( 'thumb.php' ); $img = Image::newFromName( $fileName ); if ( $img ) { $thumb = $img->renderThumb( $width, false ); } else { $thumb = false; } if ( $thumb && $thumb->path ) { wfStreamFile( $thumb->path ); } else { $badtitle = wfMsg( 'badtitle' ); $badtitletext = wfMsg( 'badtitletext' ); echo " $badtitle

$badtitle

$badtitletext

"; } wfProfileOut( 'thumb.php' ); ?>