r41072 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41071‎ | r41072 | r41073 >
Date:14:46, 20 September 2008
Author:aaron
Status:old
Tags:
Comment:
Remove more transactions
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -1076,8 +1076,6 @@
10771077 'fr_img_sha1' => $fileData ? $fileData['sha1'] : null
10781078 );
10791079
1080 - # Start!
1081 - $dbw->begin();
10821080 # Update flagged revisions table
10831081 $dbw->replace( 'flaggedrevs',
10841082 array( array('fr_page_id','fr_rev_id') ), $revisionset,
@@ -1103,9 +1101,7 @@
11041102 }
11051103 # Update the article review log
11061104 RevisionReview::updateLog( $title, $flags, array(), '', $rev->getId(), $oldSvId, true, true );
1107 - $dbw->commit();
11081105
1109 - $dbw->begin();
11101106 # If we know that this is now the new stable version
11111107 # (which it probably is), save it to the cache...
11121108 $sv = FlaggedRevision::newFromStable( $article->getTitle(), FR_FOR_UPDATE );
@@ -1120,8 +1116,6 @@
11211117 $data = FlaggedRevs::makeMemcObj( "true" );
11221118 $wgMemc->set( $key, $data, $wgParserCacheExpireTime );
11231119 }
1124 - # Done!
1125 - $dbw->commit();
11261120
11271121 wfProfileOut( __METHOD__ );
11281122 return true;
Index: trunk/extensions/FlaggedRevs/specialpages/Stabilization_body.php
@@ -200,7 +200,6 @@
201201 }
202202
203203 $dbw = wfGetDB( DB_MASTER );
204 - $dbw->begin();
205204 # Get current config
206205 $row = $dbw->selectRow( 'flaggedpage_config',
207206 array( 'fpc_select', 'fpc_override', 'fpc_expiry' ),
@@ -283,7 +282,6 @@
284283 } else {
285284 $wgUser->removeWatch( $this->page );
286285 }
287 - $dbw->commit();
288286
289287 $wgOut->redirect( $this->page->getFullUrl() );
290288
Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php
@@ -84,9 +84,7 @@
8585 }
8686 # Mark as patrolled
8787 $dbw = wfGetDB( DB_MASTER );
88 - $dbw->begin();
8988 $changed = RecentChange::markPatrolled( $this->rcid );
90 - $dbw->commit();
9189 # Inform the user
9290 $wgOut->addWikiText( wfMsg( 'revreview-patrolled', $this->page->getPrefixedText() ) );
9391 $wgOut->returnToMain( false, SpecialPage::getTitleFor( 'Recentchanges' ) );
@@ -677,9 +675,7 @@
678676 self::updateRecentChanges( $this->page, $rev->getId(), $this->rcid );
679677 # Update the article review log
680678 self::updateLog( $this->page, $this->dims, $this->oflags, $this->comment, $this->oldid, $oldSvId, true );
681 - $dbw->commit();
682679
683 - $dbw->begin();
684680 # Update the links tables as the stable version may now be the default page.
685681 # Try using the parser cache first since we didn't actually edit the current version.
686682 $parserCache = ParserCache::singleton();
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -155,7 +155,6 @@
156156 }
157157 wfProfileIn( __METHOD__ );
158158 $dbw = wfGetDB( DB_MASTER );
159 - $dbw->begin();
160159 # Check if this page has a stable version by fetching it.
161160 # Try the process cache...
162161 $sv = isset($u->fr_stableRev) ?
@@ -229,7 +228,6 @@
230229 if ( count($insertions) ) {
231230 $dbw->insert( 'flaggedrevs_tracking', $insertions, __METHOD__, 'IGNORE' );
232231 }
233 - $dbw->commit();
234232 wfProfileOut( __METHOD__ );
235233 return true;
236234 }