X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=profileinfo.php;h=3117db31fd2d20a3770ec71a76f6bd340ea0d6f6;hb=b7dfb404eddcf569010612ab58f889ac624aaa77;hp=2329f6a41eb08cddb3f3661ccf7b7204938a0920;hpb=9e6c7cc8efda090a5fa292b37eb20ba7c2ad0c87;p=lhc%2Fweb%2Fwiklou.git diff --git a/profileinfo.php b/profileinfo.php index 2329f6a41e..3117db31fd 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -28,8 +28,14 @@ ini_set( 'zlib.output_compression', 'off' ); $wgEnableProfileInfo = $wgProfileToDatabase = false; +if ( isset( $_SERVER['MW_COMPILED'] ) ) { + require ( 'phase3/includes/WebStart.php' ); +} else { + require ( dirname( __FILE__ ) . '/includes/WebStart.php' ); +} + -require_once( './includes/WebStart.php' ); +header( 'Content-Type: text/html; charset=utf-8' ); ?> @@ -83,6 +89,8 @@ class profile_point { var $time; var $children; + static $totaltime, $totalmemory, $totalcount; + function __construct( $name, $count, $time, $memory ) { $this->name = $name; $this->count = $count; @@ -95,24 +103,25 @@ class profile_point { $this->children[] = $child; } - function display($indent = 0.0) { - global $expand, $totaltime, $totalmemory, $totalcount; + function display( $expand, $indent = 0.0 ) { usort( $this->children, 'compare_point' ); - $extet = ''; - if ( isset( $expand[$this->name()] ) ) - $ex = true; - else $ex = false; + $ex = isset( $expand[$this->name()] ); + if ( !$ex ) { if ( count( $this->children ) ) { $url = getEscapedProfileUrl( false, false, $expand + array( $this->name() => true ) ); $extet = " [+]"; - } else $extet = ''; + } else { + $extet = ''; + } } else { $e = array(); - foreach ( $expand as $name => $ep ) - if ( $name != $this->name() ) + foreach ( $expand as $name => $ep ) { + if ( $name != $this->name() ) { $e += array( $name => $ep ); + } + } $extet = " [â]"; } @@ -121,19 +130,19 @@ class profile_point {
Total time:
-Total memory:
+Total time:
+Total memory: