Merge "RCFilters UI: Adjust popup positioning again"
[lhc/web/wiklou.git] / includes / specials / SpecialRecentchangeslinked.php
index a259ac2..873285b 100644 (file)
@@ -46,7 +46,12 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                $opts['target'] = $par;
        }
 
-       public function doMainQuery( $conds, $opts ) {
+       /**
+        * @inheritdoc
+        */
+       protected function doMainQuery( $tables, $select, $conds, $query_options,
+               $join_conds, FormOptions $opts ) {
+
                $target = $opts['target'];
                $showlinkedto = $opts['showlinkedto'];
                $limit = $opts['limit'];
@@ -57,7 +62,7 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                $outputPage = $this->getOutput();
                $title = Title::newFromText( $target );
                if ( !$title || $title->isExternal() ) {
-                       $outputPage->addHtml( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )
+                       $outputPage->addHTML( '<div class="errorbox">' . $this->msg( 'allpagesbadtitle' )
                                        ->parse() . '</div>' );
 
                        return false;
@@ -74,15 +79,13 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                 * expects only one result set so we use UNION instead.
                 */
 
-               $dbr = wfGetDB( DB_SLAVE, 'recentchangeslinked' );
+               $dbr = wfGetDB( DB_REPLICA, 'recentchangeslinked' );
                $id = $title->getArticleID();
                $ns = $title->getNamespace();
                $dbkey = $title->getDBkey();
 
-               $tables = [ 'recentchanges' ];
-               $select = RecentChange::selectFields();
-               $join_conds = [];
-               $query_options = [];
+               $tables[] = 'recentchanges';
+               $select = array_merge( RecentChange::selectFields(), $select );
 
                // left join with watchlist table to highlight watched rows
                $uid = $this->getUser()->getId();