Added missing global for $wgProfileToDatabase.
authorMr. E23 <e23@users.mediawiki.org>
Mon, 1 Dec 2003 00:09:05 +0000 (00:09 +0000)
committerMr. E23 <e23@users.mediawiki.org>
Mon, 1 Dec 2003 00:09:05 +0000 (00:09 +0000)
includes/Profiling.php

index b25b667..1bdf3fb 100755 (executable)
@@ -47,7 +47,7 @@ class Profiler
 
        function profileOut( $functionname) 
        {
-               global $wgDebugProfiling, $wgDebugFunctionEntry, $wgProfileToDatabase;
+               global $wgDebugProfiling, $wgDebugFunctionEntry;
 
                if ( $wgDebugFunctionEntry && function_exists( "wfDebug" ) ) {
                        wfDebug( "Exiting $functionname\n" );
@@ -128,6 +128,7 @@ class Profiler
                        $prof .= sprintf( $format, $fname, $calls, (float)($elapsed * 1000), 
                                        (float)($elapsed * 1000) / $calls, $percent );
 
+                       global $wgProfileToDatabase;
                        if( $wgProfileToDatabase ) {
                                Profiler::logToDB( $fname, (float)($elapsed * 1000), $calls );
                        }