r49002 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49001‎ | r49002 | r49003 >
Date:14:18, 29 March 2009
Author:midom
Status:ok
Tags:
Comment:
fix rollback links in watchlists, use a join'ed `page` for that
Modified paths:
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -214,9 +214,12 @@
215215 if( $andHidePatrolled ) $conds[] = $andHidePatrolled;
216216 if( $nameSpaceClause ) $conds[] = $nameSpaceClause;
217217
218 - if ( $usePage ) {
 218+ $rollbacker = $wgUser->isAllowed('rollback');
 219+ if ( $usePage || $rollbacker ) {
219220 $tables[] = 'page';
220221 $join_conds['page'] = array('LEFT JOIN','rc_cur_id=page_id');
 222+ if ($rollbacker)
 223+ $fields[] = 'page_latest';
221224 }
222225
223226 ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, $join_conds, '' );

Follow-up revisions

RevisionCommit summaryAuthorDate
r50167Backport r49002, prevents watchlist breakage in conjunction with already-back...tstarling09:29, 4 May 2009

Status & tagging log