Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F4826
mw.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 10:08 PM
2014-11-21 22:08:56 (UTC+0)
Size
3 KB
Referenced Files
None
Subscribers
None
mw.patch
View Options
diff -urw mediawiki-1.12.0/includes/filerepo/File.php mediawiki-1.12.0-fixed/includes/filerepo/File.php
--- mediawiki-1.12.0/includes/filerepo/File.php 2008-03-20 22:08:46.000000000 +0000
+++ mediawiki-1.12.0-fixed/includes/filerepo/File.php 2008-04-17 15:53:34.000000000 +0100
@@ -488,7 +488,7 @@
* @return MediaTransformOutput
*/
function transform( $params, $flags = 0 ) {
- global $wgUseSquid, $wgIgnoreImageErrors;
+ global $wgIgnoreImageErrors;
wfProfileIn( __METHOD__ );
do {
@@ -535,10 +535,6 @@
$thumb = $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
}
}
-
- if ( $wgUseSquid ) {
- wfPurgeSquidServers( array( $thumbUrl ) );
- }
} while (false);
wfProfileOut( __METHOD__ );
diff -urw mediawiki-1.12.0/includes/media/Bitmap.php mediawiki-1.12.0-fixed/includes/media/Bitmap.php
--- mediawiki-1.12.0/includes/media/Bitmap.php 2008-03-20 22:08:47.000000000 +0000
+++ mediawiki-1.12.0-fixed/includes/media/Bitmap.php 2008-04-17 15:56:10.000000000 +0100
@@ -40,6 +40,7 @@
global $wgUseImageMagick, $wgImageMagickConvertCommand;
global $wgCustomConvertCommand;
global $wgSharpenParameter, $wgSharpenReductionThreshold;
+ global $wgUseSquid;
if ( !$this->normaliseParams( $image, $params ) ) {
return new TransformParameterError( $params );
@@ -194,6 +195,10 @@
$retval = 0;
}
+ if ( $wgUseSquid ) {
+ wfPurgeSquidServers( array( $dstUrl ) );
+ }
+
$removed = $this->removeBadFile( $dstPath, $retval );
if ( $retval != 0 || $removed ) {
wfDebugLog( 'thumbnail',
diff -urw mediawiki-1.12.0/includes/media/DjVu.php mediawiki-1.12.0-fixed/includes/media/DjVu.php
--- mediawiki-1.12.0/includes/media/DjVu.php 2008-03-20 22:08:47.000000000 +0000
+++ mediawiki-1.12.0-fixed/includes/media/DjVu.php 2008-04-17 15:56:49.000000000 +0100
@@ -62,6 +62,7 @@
function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
global $wgDjvuRenderer, $wgDjvuPostProcessor;
+ global $wgUseSquid;
// Fetch XML and check it, to give a more informative error message than the one which
// normaliseParams will inevitably give.
@@ -103,6 +104,10 @@
$err = wfShellExec( $cmd, $retval );
wfProfileOut( 'ddjvu' );
+ if ( $wgUseSquid ) {
+ wfPurgeSquidServers( array( $dstUrl ) );
+ }
+
$removed = $this->removeBadFile( $dstPath, $retval );
if ( $retval != 0 || $removed ) {
wfDebugLog( 'thumbnail',
diff -urw mediawiki-1.12.0/includes/media/SVG.php mediawiki-1.12.0-fixed/includes/media/SVG.php
--- mediawiki-1.12.0/includes/media/SVG.php 2008-03-20 22:08:47.000000000 +0000
+++ mediawiki-1.12.0-fixed/includes/media/SVG.php 2008-04-17 15:56:18.000000000 +0100
@@ -38,6 +38,7 @@
function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
global $wgSVGConverters, $wgSVGConverter, $wgSVGConverterPath;
+ global $wgUseSquid;
if ( !$this->normaliseParams( $image, $params ) ) {
return new TransformParameterError( $params );
@@ -73,6 +74,10 @@
wfProfileOut( 'rsvg' );
}
+ if ( $wgUseSquid ) {
+ wfPurgeSquidServers( array( $dstUrl ) );
+ }
+
$removed = $this->removeBadFile( $dstPath, $retval );
if ( $retval != 0 || $removed ) {
wfDebugLog( 'thumbnail',
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4390
Default Alt Text
mw.patch (3 KB)
Attached To
Mode
T15776: Images which are too small too need thumbnailing are repeatedly purged from Squid
Attached
Detach File
Event Timeline
Log In to Comment