Merge "SpecialMovepage: Convert form to use OOUI controls"
[lhc/web/wiklou.git] / includes / objectcache / MemcachedPeclBagOStuff.php
index f2c4928..1b2c8db 100644 (file)
@@ -115,12 +115,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                $this->client->addServers( $servers );
        }
 
-       /**
-        * @param string $key
-        * @param float $casToken [optional]
-        * @return mixed
-        */
-       public function get( $key, &$casToken = null ) {
+       public function get( $key, &$casToken = null, $flags = 0 ) {
                $this->debugLog( "get($key)" );
                $result = $this->client->get( $this->encodeKey( $key ), null, $casToken );
                $result = $this->checkResult( $key, $result );
@@ -238,15 +233,16 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                return $result;
        }
 
-       /**
-        * @param array $keys
-        * @return array
-        */
-       public function getMulti( array $keys ) {
+       public function getMulti( array $keys, $flags = 0 ) {
                $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
                $callback = array( $this, 'encodeKey' );
-               $result = $this->client->getMulti( array_map( $callback, $keys ) );
-               $result = $result ?: array(); // must be an array
+               $encodedResult = $this->client->getMulti( array_map( $callback, $keys ) );
+               $encodedResult = $encodedResult ?: array(); // must be an array
+               $result = array();
+               foreach ( $encodedResult as $key => $value ) {
+                       $key = $this->decodeKey( $key );
+                       $result[$key] = $value;
+               }
                return $this->checkResult( false, $result );
        }