From: Tim Starling Date: Fri, 4 Aug 2006 20:15:07 +0000 (+0000) Subject: Fixed $wgDebugComments X-Git-Tag: 1.31.0-rc.0~56080 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=88ddff4eb8db8a862dc2d76bcc696493a24bf2c6;p=lhc%2Fweb%2Fwiklou.git Fixed $wgDebugComments --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 090d965380..dc299f649b 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -190,13 +190,25 @@ function wfUrlencode ( $s ) { */ function wfDebug( $text, $logonly = false ) { global $wgOut, $wgDebugLogFile, $wgDebugComments, $wgProfileOnly, $wgDebugRawPage; + static $recursion = 0; # Check for raw action using $_GET not $wgRequest, since the latter might not be initialised yet if ( isset( $_GET['action'] ) && $_GET['action'] == 'raw' && !$wgDebugRawPage ) { return; } - if ( isset( $wgOut ) && $wgDebugComments && !$logonly ) { + if ( $wgDebugComments && !$logonly ) { + if ( !isset( $wgOut ) ) { + return; + } + if ( !StubObject::isRealObject( $wgOut ) ) { + if ( $recursion ) { + return; + } + $recursion++; + $wgOut->_unstub(); + $recursion--; + } $wgOut->debug( $text ); } if ( '' != $wgDebugLogFile && !$wgProfileOnly ) { diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 81e923682f..6063b39166 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -269,7 +269,12 @@ class MonoBookTemplate extends QuickTemplate { html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> html('reporttime') ?> +data['debug'] ): ?> + +