From d22dad35da5fc0072e8f763eadc3c967131af6e5 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Sun, 29 Mar 2009 14:18:59 +0000 Subject: [PATCH] fix rollback links in watchlists, use a join'ed `page` for that --- includes/specials/SpecialWatchlist.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index c62919bc54..79f054d0e9 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -214,9 +214,12 @@ function wfSpecialWatchlist( $par ) { if( $andHidePatrolled ) $conds[] = $andHidePatrolled; if( $nameSpaceClause ) $conds[] = $nameSpaceClause; - if ( $usePage ) { + $rollbacker = $wgUser->isAllowed('rollback'); + if ( $usePage || $rollbacker ) { $tables[] = 'page'; $join_conds['page'] = array('LEFT JOIN','rc_cur_id=page_id'); + if ($rollbacker) + $fields[] = 'page_latest'; } ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, $join_conds, '' ); -- 2.20.1