Merge "Add DB ConnectionManagers"
[lhc/web/wiklou.git] / includes / specials / SpecialDoubleRedirects.php
index 7b00064..9140bf1 100644 (file)
@@ -50,7 +50,7 @@ class DoubleRedirectsPage extends QueryPage {
 
        function reallyGetQueryInfo( $namespace = null, $title = null ) {
                $limitToTitle = !( $namespace === null && $title === null );
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = wfGetDB( DB_REPLICA );
                $retval = [
                        'tables' => [
                                'ra' => 'redirect',
@@ -121,7 +121,7 @@ class DoubleRedirectsPage extends QueryPage {
                // get a little more detail about each individual entry quickly
                // using the filter of reallyGetQueryInfo.
                if ( $result && !isset( $result->nsb ) ) {
-                       $dbr = wfGetDB( DB_SLAVE );
+                       $dbr = wfGetDB( DB_REPLICA );
                        $qi = $this->reallyGetQueryInfo(
                                $result->namespace,
                                $result->title
@@ -137,14 +137,15 @@ class DoubleRedirectsPage extends QueryPage {
                                $result = $dbr->fetchObject( $res );
                        }
                }
+               $linkRenderer = $this->getLinkRenderer();
                if ( !$result ) {
-                       return '<del>' . Linker::link( $titleA, null, [], [ 'redirect' => 'no' ] ) . '</del>';
+                       return '<del>' . $linkRenderer->makeLink( $titleA, null, [], [ 'redirect' => 'no' ] ) . '</del>';
                }
 
                $titleB = Title::makeTitle( $result->nsb, $result->tb );
                $titleC = Title::makeTitle( $result->nsc, $result->tc, '', $result->iwc );
 
-               $linkA = Linker::linkKnown(
+               $linkA = $linkRenderer->makeKnownLink(
                        $titleA,
                        null,
                        [],
@@ -158,26 +159,24 @@ class DoubleRedirectsPage extends QueryPage {
                        // check, if the content model is editable through action=edit
                        ContentHandler::getForTitle( $titleA )->supportsDirectEditing()
                ) {
-                       $edit = Linker::linkKnown(
+                       $edit = $linkRenderer->makeKnownLink(
                                $titleA,
-                               $this->msg( 'parentheses', $this->msg( 'editlink' )->text() )->escaped(),
+                               $this->msg( 'parentheses', $this->msg( 'editlink' )->text() )->text(),
                                [],
-                               [
-                                       'action' => 'edit'
-                               ]
+                               [ 'action' => 'edit' ]
                        );
                } else {
                        $edit = '';
                }
 
-               $linkB = Linker::linkKnown(
+               $linkB = $linkRenderer->makeKnownLink(
                        $titleB,
                        null,
                        [],
                        [ 'redirect' => 'no' ]
                );
 
-               $linkC = Linker::linkKnown( $titleC );
+               $linkC = $linkRenderer->makeKnownLink( $titleC );
 
                $lang = $this->getLanguage();
                $arr = $lang->getArrow() . $lang->getDirMark();