jenkins-bot has submitted this change and it was merged.

Change subject: Removed commented-out migrateThumbFile() code
......................................................................


Removed commented-out migrateThumbFile() code

Change-Id: Ic52d3a8d93808b365c3f06fef9e51d65efcd1d57
---
M includes/filerepo/file/File.php
M includes/filerepo/file/LocalFile.php
2 files changed, 0 insertions(+), 37 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 84daa80..a9af1e8 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -989,8 +989,6 @@
                                        $thumb = $handler->getTransform( $this, 
$thumbPath, $thumbUrl, $params );
                                        break;
                                }
-                               // Clean up broken thumbnails as needed
-                               $this->migrateThumbFile( $thumbName );
                                // Check if an up-to-date thumbnail already 
exists...
                                wfDebug( __METHOD__ . ": Doing stat for 
$thumbPath\n" );
                                if ( !( $flags & self::RENDER_FORCE ) && 
$this->repo->fileExists( $thumbPath ) ) {
diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 5bc7b5e..9b9f0a9 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -822,41 +822,6 @@
        /** createThumb inherited */
        /** transform inherited */
 
-       /**
-        * Fix thumbnail files from 1.4 or before, with extreme prejudice
-        * @todo Do we still care about this? Perhaps a maintenance script
-        *   can be made instead. Enabling this code results in a serious
-        *   RTT regression for wikis without 404 handling.
-        *
-        * @param string $thumbName
-        */
-       function migrateThumbFile( $thumbName ) {
-               /* Old code for bug 2532
-               $thumbDir = $this->getThumbPath();
-               $thumbPath = "$thumbDir/$thumbName";
-               if ( is_dir( $thumbPath ) ) {
-                       // Directory where file should be
-                       // This happened occasionally due to broken migration 
code in 1.5
-                       // Rename to broken-*
-                       for ( $i = 0; $i < 100; $i++ ) {
-                               $broken = $this->repo->getZonePath( 'public' ) 
. "/broken-$i-$thumbName";
-                               if ( !file_exists( $broken ) ) {
-                                       rename( $thumbPath, $broken );
-                                       break;
-                               }
-                       }
-                       // Doesn't exist anymore
-                       clearstatcache();
-               }
-               */
-               /*
-               if ( $this->repo->fileExists( $thumbDir ) ) {
-                       // Delete file where directory should be
-                       $this->repo->cleanupBatch( array( $thumbDir ) );
-               }
-               */
-       }
-
        /** getHandler inherited */
        /** iconThumb inherited */
        /** getLastError inherited */

-- 
To view, visit https://gerrit.wikimedia.org/r/130567
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic52d3a8d93808b365c3f06fef9e51d65efcd1d57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Chad <ch...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to