Tweaked some of the default LockManager ttls
[lhc/web/wiklou.git] / includes / filebackend / lockmanager / LockManager.php
index 7e06e48..762bc66 100644 (file)
@@ -72,9 +72,9 @@ abstract class LockManager {
        public function __construct( array $config ) {
                $this->domain = isset( $config['domain'] ) ? $config['domain'] : wfWikiID();
                if ( isset( $config['lockTTL'] ) ) {
-                       $this->lockTTL = max( 1, $config['lockTTL'] );
+                       $this->lockTTL = max( 5, $config['lockTTL'] );
                } elseif ( PHP_SAPI === 'cli' ) {
-                       $this->lockTTL = 2 * 3600;
+                       $this->lockTTL = 3600;
                } else {
                        $met = ini_get( 'max_execution_time' ); // this is 0 in CLI mode
                        $this->lockTTL = max( 5 * 60, 2 * (int)$met );
@@ -204,8 +204,8 @@ abstract class LockManager {
                                $lockedByType[$type] = $paths;
                        } else {
                                // Release the subset of locks that were acquired
-                               foreach ( $lockedByType as $type => $paths ) {
-                                       $status->merge( $this->doUnlock( $paths, $type ) );
+                               foreach ( $lockedByType as $lType => $lPaths ) {
+                                       $status->merge( $this->doUnlock( $lPaths, $lType ) );
                                }
                                break;
                        }