r91746 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91745‎ | r91746 | r91747 >
Date:18:42, 8 July 2011
Author:reedy
Status:ok
Tags:
Comment:
Apply slightly modified patch of https://bugzilla.wikimedia.org/show_bug.cgi?id=28613#c35 to 1.17wmf1

Testing thumbnail purging issues
Modified paths:
  • /branches/wmf/1.17wmf1/includes/filerepo/LocalFile.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/filerepo/LocalFile.php
@@ -669,7 +669,13 @@
670670 if ( strpos( $file, $this->getName() ) !== false ) {
671671 $url = $this->getThumbUrl( $file );
672672 $urls[] = $url;
673 - @unlink( "$dir/$file" );
 673+ wfSuppressWarnings();
 674+ $res = unlink( "$dir/$file" );
 675+ wfRestoreWarnings();
 676+ if( !$res ) {
 677+ $err = error_get_last();
 678+ wfDebugLog( 'purgeThumbnails', __METHOD__ . 'Error deleting' . "$dir/$file: {$err['message']}\n" );
 679+ }
674680 }
675681 }
676682

Follow-up revisions

RevisionCommit summaryAuthorDate
r91751Partial revert of r91746reedy19:32, 8 July 2011

Status & tagging log