Merge "Make some replication logging more structured"
[lhc/web/wiklou.git] / includes / parser / LinkHolderArray.php
index b34ac1f..e7712f2 100644 (file)
@@ -267,10 +267,8 @@ class LinkHolderArray {
         * @param string $text
         */
        public function replace( &$text ) {
-
                $this->replaceInternal( $text );
                $this->replaceInterwiki( $text );
-
        }
 
        /**
@@ -289,7 +287,7 @@ class LinkHolderArray {
                $output = $this->parent->getOutput();
                $linkRenderer = $this->parent->getLinkRenderer();
 
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = wfGetDB( DB_REPLICA );
 
                # Sort by namespace
                ksort( $this->internals );
@@ -414,7 +412,6 @@ class LinkHolderArray {
                        $replacer->cb(),
                        $text
                );
-
        }
 
        /**
@@ -534,7 +531,7 @@ class LinkHolderArray {
 
                if ( !$linkBatch->isEmpty() ) {
                        // construct query
-                       $dbr = wfGetDB( DB_SLAVE );
+                       $dbr = wfGetDB( DB_REPLICA );
                        $fields = array_merge(
                                LinkCache::getSelectFields(),
                                [ 'page_namespace', 'page_title' ]
@@ -614,7 +611,6 @@ class LinkHolderArray {
         * @return string
         */
        public function replaceText( $text ) {
-
                $text = preg_replace_callback(
                        '/<!--(LINK|IWLINK) (.*?)-->/',
                        [ &$this, 'replaceTextCallback' ],