http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97508

Revision: 97508
Author:   reedy
Date:     2011-09-19 15:35:48 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
1.18wmf1, Merge r96552, r96835

Modified Paths:
--------------
    branches/wmf/1.18wmf1/includes/Setup.php
    branches/wmf/1.18wmf1/includes/Skin.php
    branches/wmf/1.18wmf1/includes/cache/MessageCache.php

Modified: branches/wmf/1.18wmf1/includes/Setup.php
===================================================================
--- branches/wmf/1.18wmf1/includes/Setup.php    2011-09-19 15:34:24 UTC (rev 
97507)
+++ branches/wmf/1.18wmf1/includes/Setup.php    2011-09-19 15:35:48 UTC (rev 
97508)
@@ -416,11 +416,11 @@
 
 if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
        if ( $wgRequest->checkSessionCookie() || isset( 
$_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
-               wfIncrStats( 'request_with_session' );
+               # wfIncrStats( 'request_with_session' );
                wfSetupSession();
                $wgSessionStarted = true;
        } else {
-               wfIncrStats( 'request_without_session' );
+               # wfIncrStats( 'request_without_session' );
                $wgSessionStarted = false;
        }
 }
@@ -449,7 +449,10 @@
 /**
  * @var Parser
  */
-$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( 
$wgParserConf ) );
+#$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( 
$wgParserConf ) );
+# Live hack to clear up profiling -- TS
+$class = $wgParserConf['class'];
+$wgParser = new $class( $wgParserConf );
 
 if ( !is_object( $wgAuth ) ) {
        $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' );

Modified: branches/wmf/1.18wmf1/includes/Skin.php
===================================================================
--- branches/wmf/1.18wmf1/includes/Skin.php     2011-09-19 15:34:24 UTC (rev 
97507)
+++ branches/wmf/1.18wmf1/includes/Skin.php     2011-09-19 15:35:48 UTC (rev 
97508)
@@ -1179,13 +1179,13 @@
         * @return array
         */
        function buildSidebar() {
-               global $parserMemc, $wgEnableSidebarCache, 
$wgSidebarCacheExpiry;
+               global $wgMemc, $wgEnableSidebarCache, $wgSidebarCacheExpiry;
                wfProfileIn( __METHOD__ );
 
                $key = wfMemcKey( 'sidebar', $this->getLang()->getCode() );
 
                if ( $wgEnableSidebarCache ) {
-                       $cachedsidebar = $parserMemc->get( $key );
+                       $cachedsidebar = $wgMemc->get( $key );
                        if ( $cachedsidebar ) {
                                wfProfileOut( __METHOD__ );
                                return $cachedsidebar;
@@ -1197,7 +1197,7 @@
 
                wfRunHooks( 'SkinBuildSidebar', array( $this, &$bar ) );
                if ( $wgEnableSidebarCache ) {
-                       $parserMemc->set( $key, $bar, $wgSidebarCacheExpiry );
+                       $wgMemc->set( $key, $bar, $wgSidebarCacheExpiry );
                }
 
                wfProfileOut( __METHOD__ );

Modified: branches/wmf/1.18wmf1/includes/cache/MessageCache.php
===================================================================
--- branches/wmf/1.18wmf1/includes/cache/MessageCache.php       2011-09-19 
15:34:24 UTC (rev 97507)
+++ branches/wmf/1.18wmf1/includes/cache/MessageCache.php       2011-09-19 
15:35:48 UTC (rev 97508)
@@ -457,10 +457,10 @@
                        $codes = array_keys( Language::getLanguageNames() );
                }
 
-               global $parserMemc;
+               global $wgMemc;
                foreach ( $codes as $code ) {
                        $sidebarKey = wfMemcKey( 'sidebar', $code );
-                       $parserMemc->delete( $sidebarKey );
+                       $wgMemc->delete( $sidebarKey );
                }
 
                // Update the message in the message blob store


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to