If we already know that the triggeringRevisionId is outdated, fail early
instead of doing all the work of re-parsing that old revision and
preparing all the updates only to fail later at the lockAndGetLatest()
call.
Change-Id: Ic70c659899d5d47e74fa17c88ed26b436732ca8a
return false; // just deleted?
}
+ if ( !$revision->isCurrent() ) {
+ // If the revision isn't current, there's no point in doing a bunch
+ // of work just to fail at the lockAndGetLatest() check later.
+ $this->setLastError( "Revision {$revision->getId()} is not current" );
+ return false;
+ }
+
$content = $revision->getContent( Revision::RAW );
if ( !$content ) {
// If there is no content, pretend the content is empty