}
$dbw = wfGetDB( DB_MASTER );
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
# Insert the row if it doesn't exist yet (e.g., this is being run via
# update.php from a pre-1.16 schema). TODO: This will cause lots and
array( 'cat_title' => $this->mName ),
__METHOD__
);
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
# Now we should update our local counts.
$this->mPages = $result->pages;
if ( $page->doDeleteArticleReal( $reason, $suppress, 0, false, $error, $user ) >= WikiPage::DELETE_SUCCESS ) {
$status = $file->delete( $reason, $suppress );
if( $status->isOK() ) {
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
} else {
- $dbw->rollback();
+ $dbw->rollback( __METHOD__ );
}
}
} catch ( MWException $e ) {
// rollback before returning to prevent UI from displaying incorrect "View or restore N deleted edits?"
- $dbw->rollback();
+ $dbw->rollback( __METHOD__ );
throw $e;
}
}
foreach ( $storageKeys as $key ) {
$hashPath = $this->getDeletedHashPath( $key );
$path = "$root/$hashPath$key";
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
// Check for usage in deleted/hidden files and pre-emptively
// lock the key to avoid any future use until we are finished.
$deleted = $this->deletedFileHasKey( $key, 'lock' );
wfDebug( __METHOD__ . ": $key still in use\n" );
$status->successCount++;
}
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
}
return $status;
}
$this->res = false;
$dbw = wfGetDB( DB_MASTER );
$this->doQuery( $dbw );
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
$status = Status::newGood();
$missing = array_flip( $this->ids );
$this->clearFileOps();
'authorIds' => $authorIds,
'authorIPs' => $authorIPs
) );
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
// Clear caches
$status->merge( $this->doPostCommitUpdates() );
$this->output( $source->getPrefixedText() . ' --> ' . $dest->getPrefixedText() );
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
$err = $source->moveTo( $dest, false, $reason );
if ( $err !== true ) {
$msg = array_shift( $err[0] );
$this->output( "\nFAILED: " . wfMsg( $msg, $err[0] ) );
}
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
$this->output( "\n" );
if ( $interval ) {
$chunk = new ConcatenatedGzipHistoryBlob();
$stubs = array();
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
$usedChunk = false;
$primaryOldid = $revs[$i]->rev_text_id;
}
# Done, next
$this->output( "/" );
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
$i += $thisChunkSize;
wfWaitForSlaves();
}