Index: trunk/phase3/includes/PageHistory.php |
— | — | @@ -331,14 +331,16 @@ |
332 | 332 | } |
333 | 333 | |
334 | 334 | $tools = array(); |
335 | | - |
336 | 335 | if( !is_null( $next ) && is_object( $next ) ) { |
337 | | - if( $latest && $this->mTitle->userCan( 'rollback' ) && $this->mTitle->userCan( 'edit' ) ) { |
| 336 | + # Add [rollback] link to current revision |
| 337 | + if( $latest && $this->mTitle->quickUserCan( 'rollback' ) && |
| 338 | + $this->mTitle->quickUserCan( 'edit' ) ) |
| 339 | + { |
338 | 340 | $tools[] = '<span class="mw-rollback-link">'.$this->mSkin->buildRollbackLink( $rev ).'</span>'; |
339 | 341 | } |
340 | | - |
| 342 | + # Add (undo) links to revisions |
341 | 343 | if( $this->mTitle->quickUserCan( 'edit' ) && !$rev->isDeleted( Revision::DELETED_TEXT ) && |
342 | | - !$next->rev_deleted & Revision::DELETED_TEXT ) |
| 344 | + !($next->rev_deleted & Revision::DELETED_TEXT) ) |
343 | 345 | { |
344 | 346 | # Create undo tooltip for the first (=latest) line only |
345 | 347 | $undoTooltip = $latest |