// WikiPage::READ_LOCKING as that will carry over the FOR UPDATE to
// the revisions queries (which also JOIN on user). Only lock the page
// row and CAS check on page_latest to see if the trx snapshot matches.
- $latest = $this->lock();
-
- $this->loadPageData( WikiPage::READ_LATEST );
- $id = $this->getID();
- if ( $id == 0 || $this->getLatest() != $latest ) {
+ $lockedLatest = $this->lock();
+ if ( $id == 0 || $this->getLatest() != $lockedLatest ) {
// Page not there or trx snapshot is stale
$dbw->rollback( __METHOD__ );
- $status->error( 'cannotdelete', wfEscapeWikiText( $this->getTitle()->getPrefixedText() ) );
+ $status->error( 'cannotdelete',
+ wfEscapeWikiText( $this->getTitle()->getPrefixedText() ) );
return $status;
}
}