Rename DB_SLAVE constant to DB_REPLICA
[lhc/web/wiklou.git] / includes / specials / SpecialBotPasswords.php
index bcba190..61ab642 100644 (file)
@@ -84,9 +84,6 @@ class SpecialBotPasswords extends FormSpecialPage {
        }
 
        protected function getFormFields() {
-               $user = $this->getUser();
-               $request = $this->getRequest();
-
                $fields = [];
 
                if ( $this->par !== null ) {
@@ -165,7 +162,8 @@ class SpecialBotPasswords extends FormSpecialPage {
                        ];
 
                } else {
-                       $dbr = BotPassword::getDB( DB_SLAVE );
+                       $linkRenderer = $this->getLinkRenderer();
+                       $dbr = BotPassword::getDB( DB_REPLICA );
                        $res = $dbr->select(
                                'bot_passwords',
                                [ 'bp_app_id' ],
@@ -177,12 +175,9 @@ class SpecialBotPasswords extends FormSpecialPage {
                                        'section' => 'existing',
                                        'type' => 'info',
                                        'raw' => true,
-                                       'default' => Linker::link(
+                                       'default' => $linkRenderer->makeKnownLink(
                                                $this->getPageTitle( $row->bp_app_id ),
-                                               htmlspecialchars( $row->bp_app_id ),
-                                               [],
-                                               [],
-                                               [ 'known' ]
+                                               $row->bp_app_id
                                        ),
                                ];
                        }