Also replaced two $this->getUser() calls with $user since that variable is
already in that method.
Change-Id: Iccda9f44a9cf6d3187895a8b6111bc62dca1e811
$tools = array();
# Rollback and undo links
- if ( $prevRev &&
- !count( $this->getTitle()->getUserPermissionsErrors( 'edit', $this->getUser() ) ) )
- {
- if ( $latest && !count( $this->getTitle()->getUserPermissionsErrors( 'rollback', $this->getUser() ) ) ) {
+ if ( $prevRev && $this->getTitle()->quickUserCan( 'edit', $user ) ) {
+ if ( $latest && $this->getTitle()->quickUserCan( 'rollback', $user ) ) {
$this->preventClickjacking();
$tools[] = '<span class="mw-rollback-link">' .
Linker::buildRollbackLink( $rev, $this->getContext() ) . '</span>';