From 208502dde8131e65ceef856f8c18ef114f261dae Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 10 Dec 2008 15:30:46 +0000 Subject: [PATCH] Init $parserCache only as needed --- includes/Article.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index bc7cd963e5..07fb6593c2 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -678,9 +678,6 @@ class Article { wfProfileIn( __METHOD__ ); - $parserCache = ParserCache::singleton(); - $ns = $this->mTitle->getNamespace(); # shortcut - # Get variables from query string $oldid = $this->getOldID(); @@ -688,6 +685,7 @@ class Article { if( $oldid === 0 && $this->checkTouched() ) { global $wgUseETag; if( $wgUseETag ) { + $parserCache = ParserCache::singleton(); $wgOut->setETag( $parserCache->getETag($this,$wgUser) ); } if( $wgOut->checkLastModified( $this->getTouched() ) ){ @@ -702,6 +700,7 @@ class Article { } } + $ns = $this->mTitle->getNamespace(); # shortcut $sk = $wgUser->getSkin(); # getOldID may want us to redirect somewhere else -- 2.20.1