r112024 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112023‎ | r112024 | r112025 >
Date:17:07, 21 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Modified paths:
  • /branches/wmf/1.19wmf1 (modified) (history)
  • /branches/wmf/1.19wmf1/includes (modified) (history)
  • /branches/wmf/1.19wmf1/includes/EditPage.php (modified) (history)
  • /branches/wmf/1.19wmf1/includes/Setup.php (modified) (history)
  • /branches/wmf/1.19wmf1/includes/filerepo/backend/SwiftFileBackend.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/includes/Setup.php
@@ -361,7 +361,10 @@
362362 $wgCookieSecure = ( substr( $wgServer, 0, 6 ) === 'https:' );
363363 }
364364
365 -if ( $wgDebugToolbar ) {
 365+// Disable MWDebug for command line mode, this prevents MWDebug from eating up
 366+// all the memory from logging SQL queries on maintenance scripts
 367+global $wgCommandLineMode;
 368+if ( $wgDebugToolbar && !$wgCommandLineMode ) {
366369 MWDebug::init();
367370 }
368371
@@ -410,7 +413,6 @@
411414 }
412415
413416 # Useful debug output
414 -global $wgCommandLineMode;
415417 if ( $wgCommandLineMode ) {
416418 $wgRequest = new FauxRequest( array() );
417419
Index: branches/wmf/1.19wmf1/includes/filerepo/backend/SwiftFileBackend.php
@@ -792,7 +792,11 @@
793793 */
794794 protected function logException( Exception $e, $func, array $params ) {
795795 wfDebugLog( 'SwiftBackend',
796 - get_class( $e ) . " in '{$this->name}': '{$func}' with " . serialize( $params )
 796+ get_class( $e ) . " in '{$func}' (given '" . serialize( $params ) . "')" .
 797+ ( $e instanceof InvalidResponseException
 798+ ? ": {$e->getMessage()}"
 799+ : ""
 800+ )
797801 );
798802 }
799803 }
Index: branches/wmf/1.19wmf1/includes/EditPage.php
@@ -1453,13 +1453,13 @@
14541454 global $wgUser;
14551455 if ( $this->watchthis xor $this->mTitle->userIsWatching() ) {
14561456 $dbw = wfGetDB( DB_MASTER );
1457 - $dbw->begin();
 1457+ $dbw->begin( __METHOD__ );
14581458 if ( $this->watchthis ) {
14591459 WatchAction::doWatch( $this->mTitle, $wgUser );
14601460 } else {
14611461 WatchAction::doUnwatch( $this->mTitle, $wgUser );
14621462 }
1463 - $dbw->commit();
 1463+ $dbw->commit( __METHOD__ );
14641464 }
14651465 }
14661466
Property changes on: branches/wmf/1.19wmf1/includes
___________________________________________________________________
Modified: svn:mergeinfo
14671467 Merged /trunk/phase3/includes:r111658,111965-111967,112021
Property changes on: branches/wmf/1.19wmf1
___________________________________________________________________
Modified: svn:mergeinfo
14681468 Merged /trunk/phase3:r111658,111965-111967,112021

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111658Improve error log formatting and added error message info for InvalidResponse...aaron18:22, 16 February 2012
r111965fix bug #34495 — patrol log credit the user patrolled, not the user patrollingmah21:36, 20 February 2012
r111966Pass __METHOD__ to DatabaseBase::begin() and DatabaseBase::commit()ialex21:36, 20 February 2012
r111967Fix parse error from r111965ialex21:39, 20 February 2012
r112021Followup r105123, fix for MWDebug logging SQL queries on command line modejohnduhart16:48, 21 February 2012

Status & tagging log