r101181 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101180‎ | r101181 | r101182 >
Date:19:50, 28 October 2011
Author:aaron
Status:ok
Tags:
Comment:
FU r101117:
* Moved 'checkCache' callback to cURL function as the 'fillCache' function is only ever called from that function
Modified paths:
  • /trunk/phase3/thumb_handler.php (modified) (history)

Diff [purge]

Index: trunk/phase3/thumb_handler.php
@@ -49,15 +49,6 @@
5050 return;
5151 }
5252
53 - # Check any backend caches for the thumbnail...
54 - if ( isset( $thgThumbCallbacks['checkCache'] )
55 - && is_callable( $thgThumbCallbacks['checkCache'] ) )
56 - {
57 - if ( call_user_func_array( $thgThumbCallbacks['checkCache'], array( $uri, $params ) ) ) {
58 - return; // file streamed from backend thumb cache
59 - }
60 - }
61 -
6253 # Obtain and stream the thumbnail or setup for wfThumbMain() call...
6354 if ( $thgThumbCurlConfig['enabled'] ) {
6455 wfStreamThumbViaCurl( $params, $uri );
@@ -110,6 +101,15 @@
111102 function wfStreamThumbViaCurl( array $params, $uri ) {
112103 global $thgThumbCallbacks, $thgThumbCurlConfig;
113104
 105+ # Check any backend caches for the thumbnail...
 106+ if ( isset( $thgThumbCallbacks['checkCache'] )
 107+ && is_callable( $thgThumbCallbacks['checkCache'] ) )
 108+ {
 109+ if ( call_user_func_array( $thgThumbCallbacks['checkCache'], array( $uri, $params ) ) ) {
 110+ return; // file streamed from backend thumb cache
 111+ }
 112+ }
 113+
114114 if ( !extension_loaded( 'curl' ) ) {
115115 die( "cURL is not enabled for PHP on this wiki.\n" ); // sanity
116116 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r101117FU r100535:...aaron05:12, 28 October 2011

Status & tagging log