Index: trunk/phase3/includes/Setup.php |
— | — | @@ -421,16 +421,16 @@ |
422 | 422 | # Can't stub this one, it sets up $_GET and $_REQUEST in its constructor |
423 | 423 | $wgRequest = new WebRequest; |
424 | 424 | |
425 | | - $debug = "Start request\n\n{$_SERVER['REQUEST_METHOD']} {$wgRequest->getRequestURL()}"; |
| 425 | + $debug = "\n\nStart request\n{$_SERVER['REQUEST_METHOD']} {$wgRequest->getRequestURL()}\n"; |
426 | 426 | |
427 | 427 | if ( $wgDebugPrintHttpHeaders ) { |
428 | | - $debug .= "\nHTTP HEADERS:\n"; |
| 428 | + $debug .= "HTTP HEADERS:\n"; |
429 | 429 | |
430 | 430 | foreach ( $wgRequest->getAllHeaders() as $name => $value ) { |
431 | 431 | $debug .= "$name: $value\n"; |
432 | 432 | } |
433 | 433 | } |
434 | | - wfDebug( "$debug\n" ); |
| 434 | + wfDebug( $debug ); |
435 | 435 | } |
436 | 436 | |
437 | 437 | wfProfileOut( $fname . '-misc1' ); |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -876,12 +876,16 @@ |
877 | 877 | global $wgDebugLogPrefix, $wgShowDebug; |
878 | 878 | |
879 | 879 | static $cache = array(); // Cache of unoutputted messages |
880 | | - $text = wfDebugTimer() . $text; |
881 | 880 | |
882 | 881 | if ( !$wgDebugRawPage && wfIsDebugRawPage() ) { |
883 | 882 | return; |
884 | 883 | } |
885 | 884 | |
| 885 | + $timer = wfDebugTimer(); |
| 886 | + if ( $timer !== '' ) { |
| 887 | + $text = preg_replace( '/[^\n]/', $timer . '\0', $text, 1 ); |
| 888 | + } |
| 889 | + |
886 | 890 | if ( ( $wgDebugComments || $wgShowDebug ) && !$logonly ) { |
887 | 891 | $cache[] = $text; |
888 | 892 | |