Merge "Localisation updates from http://translatewiki.net."
authorTranslation updater bot <l10n-bot@translatewiki.net>
Fri, 10 May 2013 20:01:29 +0000 (20:01 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 10 May 2013 20:01:29 +0000 (20:01 +0000)
includes/objectcache/BagOStuff.php

index 58ddd6a..857943e 100644 (file)
@@ -170,7 +170,7 @@ abstract class BagOStuff {
         */
        public function lock( $key, $timeout = 60 ) {
                $timestamp = microtime( true ); // starting UNIX timestamp
-               if ( $this->add( "{$key}:lock", $timeout ) ) {
+               if ( $this->add( "{$key}:lock", 1, $timeout ) ) {
                        return true;
                }
 
@@ -186,7 +186,7 @@ abstract class BagOStuff {
                                $sleep *= 2;
                        }
                        usleep( $sleep ); // back off
-                       $locked = $this->add( "{$key}:lock", $timeout );
+                       $locked = $this->add( "{$key}:lock", 1, $timeout );
                } while ( !$locked );
 
                return $locked;