Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/71937


Change subject: Fixed file purge script to handle NULL archive names
......................................................................

Fixed file purge script to handle NULL archive names

Change-Id: Icbff842694039e018850f1fa320f6e3d5b403aac
---
M maintenance/purgeDeletedFiles.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/71937/1

diff --git a/maintenance/purgeDeletedFiles.php 
b/maintenance/purgeDeletedFiles.php
index 86658c5..9f2af33 100644
--- a/maintenance/purgeDeletedFiles.php
+++ b/maintenance/purgeDeletedFiles.php
@@ -96,6 +96,9 @@
                        __METHOD__
                );
                foreach ( $res as $row ) {
+                       if ( $row->fa_archive_name === null ) {
+                               continue; // was not an old version (current 
version names checked already)
+                       }
                        $ofile = $repo->newFromArchiveName( $file->getTitle(), 
$row->fa_archive_name );
                        // If there is an orphaned storage file still 
there...delete it
                        if ( !$file->exists() && $repo->fileExists( 
$ofile->getPath() ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icbff842694039e018850f1fa320f6e3d5b403aac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to