= filemtime( $imagePath ) ) { wfStreamFile( $thumbPath ); // Can't log profiling data with no Setup.php exit; } // OK, no valid thumbnail, time to get out the heavy machinery wfProfileOut( 'thumb.php-start' ); require_once( 'Setup.php' ); wfProfileIn( 'thumb.php-render' ); $img = Image::newFromName( $fileName ); if ( $img ) { if ( ! is_null( $page ) ) { $img->selectPage( $page ); } $thumb = $img->renderThumb( $width, false ); } else { $thumb = false; } if ( $img->lastError && $img->lastError !== true ) { header( 'HTTP/1.0 500 Internal Server Error' ); echo "
" .
htmlspecialchars( $img->lastError ) . "
" . wfHostname() .
"
$badtitletext
"; } wfProfileOut( 'thumb.php-render' ); wfProfileOut( 'thumb.php' ); wfLogProfilingData(); ?>