SpecialRecentchangeslinked: Unconditionally join on the page table
authorRoan Kattouw <roan.kattouw@gmail.com>
Tue, 19 Sep 2017 17:22:47 +0000 (10:22 -0700)
committerRoan Kattouw <roan.kattouw@gmail.com>
Tue, 19 Sep 2017 17:22:47 +0000 (10:22 -0700)
As we do on SpecialRecentchanges and SpecialWatchlist already,
because the last revision filter needs it.

Bug: T176228
Change-Id: I65f0f971df24853999ca445f968dd49fb0640066

includes/specials/SpecialRecentchangeslinked.php

index e353f0c..a13af55 100644 (file)
@@ -98,11 +98,11 @@ class SpecialRecentChangesLinked extends SpecialRecentChanges {
                                'wl_namespace=rc_namespace'
                        ] ];
                }
-               if ( $this->getUser()->isAllowed( 'rollback' ) ) {
-                       $tables[] = 'page';
-                       $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
-                       $select[] = 'page_latest';
-               }
+
+               // JOIN on page, used for 'last revision' filter highlight
+               $tables[] = 'page';
+               $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
+               $select[] = 'page_latest';
 
                $tagFilter = $opts['tagfilter'] ? explode( '|', $opts['tagfilter'] ) : [];
                ChangeTags::modifyDisplayQuery(