close profiling on script exits instead of page flushing
[lhc/web/wiklou.git] / index.php
index 360f048..3436e57 100644 (file)
--- a/index.php
+++ b/index.php
@@ -4,6 +4,7 @@
  * @package MediaWiki
  */
 $wgRequestTime = microtime();
+$wgRUstart = getrusage();
 
 unset( $IP );
 @ini_set( 'allow_url_fopen', 0 ); # For security...
@@ -165,7 +166,7 @@ if( !$wgDisableInternalSearch && !is_null( $search ) && $search !== '' ) {
                unset($wgArticle);
                require_once( 'includes/ImagePage.php' );
                $wgArticle = new ImagePage( $wgTitle );
-       } elseif ( $wgUseCategoryMagic && $ns == NS_CATEGORY ) {
+       } elseif ( $ns == NS_CATEGORY ) {
                unset($wgArticle);
                require_once( 'includes/CategoryPage.php' );
                $wgArticle = new CategoryPage( $wgTitle );
@@ -285,6 +286,7 @@ foreach ( $wgPostCommitUpdateList as $up ) {
 
 wfProfileOut( 'main-cleanup' );
 
+wfProfileClose();
 logProfilingData();
 $wgLoadBalancer->closeAll();
 wfDebug( "Request ended normally\n" );