Merge "Change 'editfont' default preference to 'monospace'"
[lhc/web/wiklou.git] / includes / libs / rdbms / lbfactory / LBFactory.php
index 53d5ef4..c891fb6 100644 (file)
@@ -55,7 +55,7 @@ abstract class LBFactory implements ILBFactory {
        /** @var BagOStuff */
        protected $srvCache;
        /** @var BagOStuff */
-       protected $memCache;
+       protected $memStash;
        /** @var WANObjectCache */
        protected $wanCache;
 
@@ -93,7 +93,7 @@ abstract class LBFactory implements ILBFactory {
                }
 
                $this->srvCache = isset( $conf['srvCache'] ) ? $conf['srvCache'] : new EmptyBagOStuff();
-               $this->memCache = isset( $conf['memCache'] ) ? $conf['memCache'] : new EmptyBagOStuff();
+               $this->memStash = isset( $conf['memStash'] ) ? $conf['memStash'] : new EmptyBagOStuff();
                $this->wanCache = isset( $conf['wanCache'] )
                        ? $conf['wanCache']
                        : WANObjectCache::newEmpty();
@@ -250,6 +250,10 @@ abstract class LBFactory implements ILBFactory {
                } );
        }
 
+       public function hasTransactionRound() {
+               return ( $this->trxRoundId !== false );
+       }
+
        /**
         * Log query info if multi DB transactions are going to be committed now
         */
@@ -431,7 +435,7 @@ abstract class LBFactory implements ILBFactory {
                }
 
                $this->chronProt = new ChronologyProtector(
-                       $this->memCache,
+                       $this->memStash,
                        [
                                'ip' => $this->requestInfo['IPAddress'],
                                'agent' => $this->requestInfo['UserAgent'],
@@ -526,7 +530,7 @@ abstract class LBFactory implements ILBFactory {
                        $prefix
                );
 
-               $this->forEachLB( function( ILoadBalancer $lb ) use ( $prefix ) {
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( $prefix ) {
                        $lb->setDomainPrefix( $prefix );
                } );
        }