X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=thumb.php;h=4a0c9fb3d394b25b92e1e13ac29b7b6bb19e01ae;hb=ea20dfe82d24896b020f25ab7d5984fee11c0634;hp=781686092b34f8af74c7d6f899b5fa2592c84580;hpb=cfdf23952dac41ac78dd97e670295098348604cd;p=lhc%2Fweb%2Fwiklou.git diff --git a/thumb.php b/thumb.php index 781686092b..4a0c9fb3d3 100644 --- a/thumb.php +++ b/thumb.php @@ -22,11 +22,7 @@ */ define( 'MW_NO_OUTPUT_COMPRESSION', 1 ); -if ( isset( $_SERVER['MW_COMPILED'] ) ) { - require( 'core/includes/WebStart.php' ); -} else { - require( __DIR__ . '/includes/WebStart.php' ); -} +require __DIR__ . '/includes/WebStart.php'; // Don't use fancy mime detection, just check the file extension for jpg/gif/png $wgTrivialMimeDetection = true; @@ -126,7 +122,7 @@ function wfStreamThumb( array $params ) { $img = new UnregisteredLocalFile( null, $repo, # Temp files are hashed based on the name without the timestamp. # The thumbnails will be hashed based on the entire name however. - # @TODO: fix this convention to actually be reasonable. + # @todo fix this convention to actually be reasonable. $repo->getZonePath( 'public' ) . '/' . $repo->getTempHashPath( $fileName ) . $fileName ); } elseif ( $isOld ) { @@ -224,7 +220,7 @@ function wfStreamThumb( array $params ) { $response->header( 'Location: ' . wfExpandUrl( $img->getThumbUrl( $thumbName ), PROTO_CURRENT ) ); $response->header( 'Expires: ' . - gmdate( 'D, d M Y H:i:s', time() + 7*86400 ) . ' GMT' ); + gmdate( 'D, d M Y H:i:s', time() + 7 * 86400 ) . ' GMT' ); if ( $wgVaryOnXFP ) { $varyHeader[] = 'X-Forwarded-Proto'; } @@ -364,7 +360,7 @@ function wfThumbError( $status, $msg ) { $hostname = htmlspecialchars( wfHostname() ); $debug = "\n\n"; } else { - $debug = ""; + $debug = ''; } echo <<Error generating thumbnail