From: John Du Hart Date: Tue, 21 Feb 2012 16:48:46 +0000 (+0000) Subject: Followup r105123, fix for MWDebug logging SQL queries on command line mode X-Git-Tag: 1.31.0-rc.0~24596 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=6fd8ea4b3fe454de145a695cc1c5c04d7e65686d;p=lhc%2Fweb%2Fwiklou.git Followup r105123, fix for MWDebug logging SQL queries on command line mode --- diff --git a/includes/Setup.php b/includes/Setup.php index c704d293ca..b858dbae5d 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -361,7 +361,10 @@ if ( $wgCookieSecure === 'detect' ) { $wgCookieSecure = ( substr( $wgServer, 0, 6 ) === 'https:' ); } -if ( $wgDebugToolbar ) { +// Disable MWDebug for command line mode, this prevents MWDebug from eating up +// all the memory from logging SQL queries on maintenance scripts +global $wgCommandLineMode; +if ( $wgDebugToolbar && !$wgCommandLineMode ) { MWDebug::init(); } @@ -410,7 +413,6 @@ if( is_null( $wgLocalTZoffset ) ) { } # Useful debug output -global $wgCommandLineMode; if ( $wgCommandLineMode ) { $wgRequest = new FauxRequest( array() );