Merge "RCFilters: Ignore 'invert' model if there are no namespaces in saved queries"
[lhc/web/wiklou.git] / includes / libs / rdbms / lbfactory / LBFactory.php
index 919f103..ef716b6 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();
@@ -115,7 +115,8 @@ abstract class LBFactory implements ILBFactory {
                $this->requestInfo = [
                        'IPAddress' => isset( $_SERVER[ 'REMOTE_ADDR' ] ) ? $_SERVER[ 'REMOTE_ADDR' ] : '',
                        'UserAgent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '',
-                       'ChronologyProtection' => 'true'
+                       'ChronologyProtection' => 'true',
+                       'ChronologyPositionTime' => isset( $_GET['cpPosTime'] ) ? $_GET['cpPosTime'] : null
                ];
 
                $this->cliMode = isset( $conf['cliMode'] ) ? $conf['cliMode'] : PHP_SAPI === 'cli';
@@ -435,12 +436,12 @@ abstract class LBFactory implements ILBFactory {
                }
 
                $this->chronProt = new ChronologyProtector(
-                       $this->memCache,
+                       $this->memStash,
                        [
                                'ip' => $this->requestInfo['IPAddress'],
                                'agent' => $this->requestInfo['UserAgent'],
                        ],
-                       isset( $_GET['cpPosTime'] ) ? $_GET['cpPosTime'] : null
+                       $this->requestInfo['ChronologyPositionTime']
                );
                $this->chronProt->setLogger( $this->replLogger );