Merge "Add attributes parameter to ShowSearchHitTitle"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 921a6dd..ff62e9e 100644 (file)
@@ -357,8 +357,9 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                $dbr = $this->getDB();
                $user = $this->getUser();
 
-               $tables = array_merge( [ 'recentchanges', 'watchlist' ], $tables );
-               $fields = array_merge( RecentChange::selectFields(), $fields );
+               $rcQuery = RecentChange::getQueryInfo();
+               $tables = array_merge( $tables, $rcQuery['tables'], [ 'watchlist' ] );
+               $fields = array_merge( $rcQuery['fields'], $fields );
 
                $join_conds = array_merge(
                        [
@@ -371,6 +372,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                                        ],
                                ],
                        ],
+                       $rcQuery['joins'],
                        $join_conds
                );