https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112332
Revision: 112332
Author: reedy
Date: 2012-02-24 17:00:52 +0000 (Fri, 24 Feb 2012)
Log Message:
-----------
More __METHOD__ into db related methods
Modified Paths:
--------------
trunk/phase3/includes/Category.php
trunk/phase3/includes/FileDeleteForm.php
trunk/phase3/includes/filerepo/LocalRepo.php
trunk/phase3/includes/revisiondelete/RevisionDeleteAbstracts.php
trunk/phase3/maintenance/moveBatch.php
trunk/phase3/maintenance/storage/compressOld.php
Modified: trunk/phase3/includes/Category.php
===================================================================
--- trunk/phase3/includes/Category.php 2012-02-24 16:54:48 UTC (rev 112331)
+++ trunk/phase3/includes/Category.php 2012-02-24 17:00:52 UTC (rev 112332)
@@ -260,7 +260,7 @@
}
$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
@@ -300,7 +300,7 @@
array( 'cat_title' => $this->mName ),
__METHOD__
);
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
# Now we should update our local counts.
$this->mPages = $result->pages;
Modified: trunk/phase3/includes/FileDeleteForm.php
===================================================================
--- trunk/phase3/includes/FileDeleteForm.php 2012-02-24 16:54:48 UTC (rev
112331)
+++ trunk/phase3/includes/FileDeleteForm.php 2012-02-24 17:00:52 UTC (rev
112332)
@@ -154,14 +154,14 @@
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;
}
}
Modified: trunk/phase3/includes/filerepo/LocalRepo.php
===================================================================
--- trunk/phase3/includes/filerepo/LocalRepo.php 2012-02-24 16:54:48 UTC
(rev 112331)
+++ trunk/phase3/includes/filerepo/LocalRepo.php 2012-02-24 17:00:52 UTC
(rev 112332)
@@ -64,7 +64,7 @@
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' );
@@ -80,7 +80,7 @@
wfDebug( __METHOD__ . ": $key still in use\n" );
$status->successCount++;
}
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
}
return $status;
}
Modified: trunk/phase3/includes/revisiondelete/RevisionDeleteAbstracts.php
===================================================================
--- trunk/phase3/includes/revisiondelete/RevisionDeleteAbstracts.php
2012-02-24 16:54:48 UTC (rev 112331)
+++ trunk/phase3/includes/revisiondelete/RevisionDeleteAbstracts.php
2012-02-24 17:00:52 UTC (rev 112332)
@@ -38,7 +38,7 @@
$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();
@@ -137,7 +137,7 @@
'authorIds' => $authorIds,
'authorIPs' => $authorIPs
) );
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
// Clear caches
$status->merge( $this->doPostCommitUpdates() );
Modified: trunk/phase3/maintenance/moveBatch.php
===================================================================
--- trunk/phase3/maintenance/moveBatch.php 2012-02-24 16:54:48 UTC (rev
112331)
+++ trunk/phase3/maintenance/moveBatch.php 2012-02-24 17:00:52 UTC (rev
112332)
@@ -92,13 +92,13 @@
$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 ) {
Modified: trunk/phase3/maintenance/storage/compressOld.php
===================================================================
--- trunk/phase3/maintenance/storage/compressOld.php 2012-02-24 16:54:48 UTC
(rev 112331)
+++ trunk/phase3/maintenance/storage/compressOld.php 2012-02-24 17:00:52 UTC
(rev 112332)
@@ -293,7 +293,7 @@
$chunk = new ConcatenatedGzipHistoryBlob();
$stubs = array();
- $dbw->begin();
+ $dbw->begin( __METHOD__ );
$usedChunk = false;
$primaryOldid = $revs[$i]->rev_text_id;
@@ -393,7 +393,7 @@
}
# Done, next
$this->output( "/" );
- $dbw->commit();
+ $dbw->commit( __METHOD__ );
$i += $thisChunkSize;
wfWaitForSlaves();
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs