X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=thumb_handler.php;h=073a87929e0550ebb76fac513f0d411f17092b2d;hb=037f754c4aaae094e2e8e3eed6cda6b3e03e74f5;hp=0f7d1af263e7bf0266af87ffca93f892b52f78e0;hpb=3a6b5d6005aac08786bec07366125097385527c5;p=lhc%2Fweb%2Fwiklou.git diff --git a/thumb_handler.php b/thumb_handler.php index 0f7d1af263..073a87929e 100644 --- a/thumb_handler.php +++ b/thumb_handler.php @@ -49,15 +49,6 @@ function wfHandleThumb404Main() { return; } - # Check any backend caches for the thumbnail... - if ( isset( $thgThumbCallbacks['checkCache'] ) - && is_callable( $thgThumbCallbacks['checkCache'] ) ) - { - if ( call_user_func_array( $thgThumbCallbacks['checkCache'], array( $uri, $params ) ) ) { - return; // file streamed from backend thumb cache - } - } - # Obtain and stream the thumbnail or setup for wfThumbMain() call... if ( $thgThumbCurlConfig['enabled'] ) { wfStreamThumbViaCurl( $params, $uri ); @@ -110,6 +101,15 @@ function wfExtractThumbParams( $uri ) { function wfStreamThumbViaCurl( array $params, $uri ) { global $thgThumbCallbacks, $thgThumbCurlConfig; + # Check any backend caches for the thumbnail... + if ( isset( $thgThumbCallbacks['checkCache'] ) + && is_callable( $thgThumbCallbacks['checkCache'] ) ) + { + if ( call_user_func_array( $thgThumbCallbacks['checkCache'], array( $uri, $params ) ) ) { + return; // file streamed from backend thumb cache + } + } + if ( !extension_loaded( 'curl' ) ) { die( "cURL is not enabled for PHP on this wiki.\n" ); // sanity }