r112698 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112697‎ | r112698 | r112699 >
Date:15:36, 29 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Add some more __METHOD__
Modified paths:
  • /trunk/extensions/AJAXPoll/AJAXPoll_body.php (modified) (history)
  • /trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php (modified) (history)
  • /trunk/extensions/Aggregator/Aggregator.php (modified) (history)
  • /trunk/extensions/ArchiveLinks/ArchiveLinks.class.php (modified) (history)
  • /trunk/extensions/NewUserMessage/NewUserMessage.class.php (modified) (history)
  • /trunk/extensions/Quiz/Quiz.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Aggregator/Aggregator.php
@@ -229,13 +229,13 @@
230230 wfDebug( "$fname saving items from $url\n" );
231231
232232 $dbw = wfGetDB( DB_MASTER );
233 - $dbw->begin();
 233+ $dbw->begin( __METHOD__ );
234234
235235 $this->clearItems( $dbw, $url );
236236 $this->insertItems( $dbw, $url, $items );
237237 $this->touchFeed( $dbw, $url );
238238
239 - $dbw->commit();
 239+ $dbw->commit( __METHOD__ );
240240 }
241241
242242 private function clearItems( $dbw, $url ) {
Index: trunk/extensions/ArchiveLinks/ArchiveLinks.class.php
@@ -25,7 +25,7 @@
2626 $db_slave = wfGetDB( DB_SLAVE );
2727 $db_result = array();
2828
29 - $db_master->begin();
 29+ $db_master->begin( __METHOD__ );
3030
3131 if ( !isset( $wgArchiveLinksConfig['global_rearchive_time'] ) ) {
3232 //30 days or 2,592,000 seconds...
@@ -127,7 +127,7 @@
128128 }
129129 }
130130
131 - $db_master->commit();
 131+ $db_master->commit( __METHOD__ );
132132
133133 return true;
134134 }
Index: trunk/extensions/Quiz/Quiz.class.php
@@ -751,11 +751,10 @@
752752 ( array_key_exists( 3, $matches ) && $value >= $matches[1] && $value <= $matches[3] ) ||
753753 $value == $possibility
754754 )
755 - )
756 - {
 755+ ) {
757756 $state = 'right';
758757 $title = 'title="' . wfMsgHtml( 'quiz_colorRight' ) . '"';
759 - } else {
 758+ } else {
760759 $state = 'wrong';
761760 $title = 'title="' . wfMsgHtml( 'quiz_colorWrong' ) . '"';
762761 }
@@ -768,8 +767,7 @@
769768 $value == $possibility ||
770769 ( preg_match( '`^' . $value . ' \(i\)$`i', $possibility ) ) ||
771770 ( !$this->mCaseSensitive && preg_match( '`^' . $value . '$`i', $possibility ) )
772 - )
773 - {
 771+ ) {
774772 $state = 'right';
775773 $title = 'title="' . wfMsgHtml( 'quiz_colorRight' ) . '"';
776774 } else {
Index: trunk/extensions/NewUserMessage/NewUserMessage.class.php
@@ -227,7 +227,7 @@
228228 }
229229
230230 $dbw = wfGetDB( DB_MASTER );
231 - $dbw->begin();
 231+ $dbw->begin( __METHOD__ );
232232
233233 try {
234234 $status = $article->doEdit( $text, $summary, $flags, false, $editor );
@@ -242,7 +242,7 @@
243243 } else {
244244 // The article was concurrently created
245245 wfDebug( __METHOD__ . ": Error ".$status->getWikiText() );
246 - $dbw->rollback();
 246+ $dbw->rollback( __METHOD__ );
247247 }
248248
249249 return $status->isGood();
Index: trunk/extensions/AJAXPoll/AJAXPoll_body.php
@@ -53,7 +53,7 @@
5454 }*/
5555
5656 $dbw = wfGetDB( DB_MASTER );
57 - $dbw->begin();
 57+ $dbw->begin( __METHOD__ );
5858 /**
5959 * Register poll in the database
6060 */
@@ -76,7 +76,7 @@
7777 __METHOD__
7878 );
7979 }
80 - $dbw->commit();
 80+ $dbw->commit( __METHOD__ );
8181
8282 // Add CSS
8383 $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/AJAXPoll/AJAXPoll.css' );
Index: trunk/extensions/AbuseFilter/Views/AbuseFilterViewEdit.php
@@ -116,7 +116,7 @@
117117 $newRow['af_user'] = $user->getId();
118118 $newRow['af_user_text'] = $user->getName();
119119
120 - $dbw->begin();
 120+ $dbw->begin( __METHOD__ );
121121
122122 // Insert MAIN row.
123123 if ( $filter == 'new' ) {
@@ -207,7 +207,7 @@
208208 }
209209 $dbw->insert( 'abuse_filter_action', $actionsRows, __METHOD__ );
210210
211 - $dbw->commit();
 211+ $dbw->commit( __METHOD__ );
212212
213213 // Logging
214214

Status & tagging log