Removed some useless code and a confusing comment in FSLockManager::doLock(). This...
authorAaron Schulz <aaron@users.mediawiki.org>
Sun, 5 Feb 2012 03:52:40 +0000 (03:52 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sun, 5 Feb 2012 03:52:40 +0000 (03:52 +0000)
includes/filerepo/backend/lockmanager/FSLockManager.php

index 33aceb4..42074fd 100644 (file)
@@ -43,14 +43,9 @@ class FSLockManager extends LockManager {
 
                $lockedPaths = array(); // files locked in this attempt
                foreach ( $paths as $path ) {
-                       $subStatus = $this->doSingleLock( $path, $type );
-                       $status->merge( $subStatus );
+                       $status->merge( $this->doSingleLock( $path, $type ) );
                        if ( $status->isOK() ) {
-                               // Don't append to $lockedPaths if $path is already locked.
-                               // We do NOT want to unlock the key if we have to rollback.
-                               if ( $subStatus->isGood() ) { // no warnings/fatals?
-                                       $lockedPaths[] = $path;
-                               }
+                               $lockedPaths[] = $path;
                        } else {
                                // Abort and unlock everything
                                $status->merge( $this->doUnlock( $lockedPaths, $type ) );