Page MenuHomePhabricator

Rollbacks improperly reported under race condition
Closed, ResolvedPublic

Description

Author: Winbots

Description:
Fixes bug.

Rollbacks can be improperly reported under certain race conditions. Mainly because the doEdit call's status is never checked before notifying of a successful rollback.

The diff should fix this.

--Cobi.


Version: 1.17.x
Severity: enhancement

Attached:

Details

Reference
bz24866

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:02 PM
bzimport set Reference to bz24866.
bzimport added a subscriber: Unknown Object (MLST).

Using the message "Cannot revert edit; last contributor is only author of this page." is bad. A new message should be added.

Also,
You should really have it with braces as per the coding style guidelines

if( !$status->isOK() ) {
return array( array( 'cantrollback' ) );
}

Bryan.TongMinh wrote:

Marking as reviewed per comment #2.

Check for $status->isOk was added with gerrit 21662