https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113195

Revision: 113195
Author:   aaron
Date:     2012-03-06 22:59:59 +0000 (Tue, 06 Mar 2012)
Log Message:
-----------
Fixed FileOp::attemptBatch() behavior when unexpected failures occur with the 
'force' option. It can't continue on since the ops assumed that $predicates was 
correct, which it won't be. It now simply halts operations.

Modified Paths:
--------------
    trunk/phase3/includes/filerepo/backend/FileOp.php

Modified: trunk/phase3/includes/filerepo/backend/FileOp.php
===================================================================
--- trunk/phase3/includes/filerepo/backend/FileOp.php   2012-03-06 22:59:41 UTC 
(rev 113194)
+++ trunk/phase3/includes/filerepo/backend/FileOp.php   2012-03-06 22:59:59 UTC 
(rev 113195)
@@ -134,13 +134,12 @@
                        } else {
                                $status->success[$index] = false;
                                ++$status->failCount;
-                               if ( !$ignoreErrors ) {
-                                       // Log remaining ops as failed for 
recovery...
-                                       for ( $i = ($index + 1); $i < count( 
$performOps ); $i++ ) {
-                                               $performOps[$i]->logFailure( 
'attempt_aborted' );
-                                       }
-                                       return $status; // bail out
+                               // We can't continue (even with $ignoreErrors) 
as $predicates is wrong.
+                               // Log the remaining ops as failed for 
recovery...
+                               for ( $i = ($index + 1); $i < count( 
$performOps ); $i++ ) {
+                                       $performOps[$i]->logFailure( 
'attempt_aborted' );
                                }
+                               return $status; // bail out
                        }
                }
 


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

Reply via email to