X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fobjectcache%2FSqlBagOStuff.php;h=91189c8145c6f05920aad3ea39e15bde6527f608;hb=a88df43d3f068b75f4d50c3c599ad2ccaf589f94;hp=3b46249cf285793f83d042aecb319c0413a5a3d2;hpb=012248fc5a7d6d0257df1a0feadbda5ae4a477e2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/objectcache/SqlBagOStuff.php b/includes/objectcache/SqlBagOStuff.php index 3b46249cf2..91189c8145 100644 --- a/includes/objectcache/SqlBagOStuff.php +++ b/includes/objectcache/SqlBagOStuff.php @@ -131,8 +131,6 @@ class SqlBagOStuff extends BagOStuff { * @throws MWException */ protected function getDB( $serverIndex ) { - global $wgDebugDBTransactions; - if ( !isset( $this->conns[$serverIndex] ) ) { if ( $serverIndex >= $this->numServers ) { throw new MWException( __METHOD__ . ": Invalid server index \"$serverIndex\"" ); @@ -147,9 +145,6 @@ class SqlBagOStuff extends BagOStuff { # If server connection info was given, use that if ( $this->serverInfos ) { - if ( $wgDebugDBTransactions ) { - $this->logger->debug( "Using provided serverInfo for SqlBagOStuff" ); - } $info = $this->serverInfos[$serverIndex]; $type = isset( $info['type'] ) ? $info['type'] : 'mysql'; $host = isset( $info['host'] ) ? $info['host'] : '[unknown]'; @@ -173,9 +168,7 @@ class SqlBagOStuff extends BagOStuff { $db = wfGetDB( $index ); } } - if ( $wgDebugDBTransactions ) { - $this->logger->debug( sprintf( "Connection %s will be used for SqlBagOStuff", $db ) ); - } + $this->logger->debug( sprintf( "Connection %s will be used for SqlBagOStuff", $db ) ); $this->conns[$serverIndex] = $db; } @@ -220,12 +213,7 @@ class SqlBagOStuff extends BagOStuff { } } - /** - * @param string $key - * @param mixed $casToken [optional] - * @return mixed - */ - public function get( $key, &$casToken = null ) { + public function get( $key, &$casToken = null, $flags = 0 ) { $values = $this->getMulti( array( $key ) ); if ( array_key_exists( $key, $values ) ) { $casToken = $values[$key]; @@ -234,11 +222,7 @@ class SqlBagOStuff extends BagOStuff { return false; } - /** - * @param array $keys - * @return array - */ - public function getMulti( array $keys ) { + public function getMulti( array $keys, $flags = 0 ) { $values = array(); // array of (key => value) $keysByTable = array();