Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -331,8 +331,7 @@ |
332 | 332 | $page = $rc->getTitle(); |
333 | 333 | /** Check for rollback and edit permissions, disallow special pages, and only |
334 | 334 | * show a link on the top-most revision */ |
335 | | - if( $page->quickUserCan('rollback') && $page->quickUserCan('edit') |
336 | | - && $page->getLatestRevID() == $rc->mAttribs['rc_this_oldid'] ) |
| 335 | + if ($wgUser->isAllowed('rollback') && $rc->mAttribs['page_latest'] == $rc->mAttribs['rc_this_oldid'] ) |
337 | 336 | { |
338 | 337 | $rev = new Revision( array( |
339 | 338 | 'id' => $rc->mAttribs['rc_this_oldid'], |
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php |
— | — | @@ -285,7 +285,10 @@ |
286 | 286 | $join_conds['watchlist'] = array('LEFT JOIN', |
287 | 287 | "wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace"); |
288 | 288 | } |
289 | | - |
| 289 | + if ($wgUser->isAllowed("rollback")) { |
| 290 | + $tables[] = 'page'; |
| 291 | + $join_conds['page'] = array('LEFT JOIN', 'rc_namespace=page_namespace AND rc_title=page_title AND rc_this_oldid=page_latest'); |
| 292 | + } |
290 | 293 | // Tag stuff. |
291 | 294 | $fields = array(); // Fields are * in this case, so let the function modify an empty array to keep it happy. |
292 | 295 | ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, $join_conds, $opts['tagfilter'] ); |