Added/Removed spaces around string concatenation
[lhc/web/wiklou.git] / includes / filebackend / lockmanager / QuorumLockManager.php
index 010a38d..3b96ad6 100644 (file)
@@ -46,8 +46,6 @@ abstract class QuorumLockManager extends LockManager {
                foreach ( $paths as $path ) {
                        if ( isset( $this->locksHeld[$path][$type] ) ) {
                                ++$this->locksHeld[$path][$type];
-                       } elseif ( isset( $this->locksHeld[$path][self::LOCK_EX] ) ) {
-                               $this->locksHeld[$path][$type] = 1;
                        } else {
                                $bucket = $this->getBucketFromPath( $path );
                                $pathsToLock[$bucket][] = $path;
@@ -127,7 +125,7 @@ abstract class QuorumLockManager extends LockManager {
 
                $yesVotes = 0; // locks made on trustable servers
                $votesLeft = count( $this->srvsByBucket[$bucket] ); // remaining peers
-               $quorum = floor( $votesLeft/2 + 1 ); // simple majority
+               $quorum = floor( $votesLeft / 2 + 1 ); // simple majority
                // Get votes for each peer, in order, until we have enough...
                foreach ( $this->srvsByBucket[$bucket] as $lockSrv ) {
                        if ( !$this->isServerUp( $lockSrv ) ) {