Index: trunk/phase3/includes/filerepo/LocalRepo.php |
— | — | @@ -49,12 +49,11 @@ |
50 | 50 | array( 'fa_storage_group' => 'deleted', 'fa_storage_key' => $key ), |
51 | 51 | __METHOD__, array( 'FOR UPDATE' ) ); |
52 | 52 | if( !$inuse ) { |
53 | | - $sha1 = substr( $key, 0, strcspn($key,'.') ); |
54 | | - $ext = substr( $key, strcspn($key,'.') ); |
| 53 | + $sha1 = substr( $key, 0, strcspn( $key, '.' ) ); |
55 | 54 | $inuse = $dbw->selectField( 'oldimage', '1', |
56 | | - array( 'oi_sha1' => $sha1, "oi_archive_name LIKE '%{$ext}'", |
57 | | - 'oi_deleted & '.File::DELETED_FILE => File::DELETED_FILE ), |
58 | | - __METHOD__, array( 'FOR UPDATE' ) ); |
| 55 | + array( 'oi_sha1' => $sha1, |
| 56 | + 'oi_deleted & '.File::DELETED_FILE => File::DELETED_FILE ), |
| 57 | + __METHOD__, array( 'FOR UPDATE' ) ); |
59 | 58 | } |
60 | 59 | if ( !$inuse ) { |
61 | 60 | wfDebug( __METHOD__ . ": deleting $key\n" ); |