r44402 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44401‎ | r44402 | r44403 >
Date:15:30, 10 December 2008
Author:aaron
Status:ok
Tags:
Comment:
Init $parserCache only as needed
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -678,9 +678,6 @@
679679
680680 wfProfileIn( __METHOD__ );
681681
682 - $parserCache = ParserCache::singleton();
683 - $ns = $this->mTitle->getNamespace(); # shortcut
684 -
685682 # Get variables from query string
686683 $oldid = $this->getOldID();
687684
@@ -688,6 +685,7 @@
689686 if( $oldid === 0 && $this->checkTouched() ) {
690687 global $wgUseETag;
691688 if( $wgUseETag ) {
 689+ $parserCache = ParserCache::singleton();
692690 $wgOut->setETag( $parserCache->getETag($this,$wgUser) );
693691 }
694692 if( $wgOut->checkLastModified( $this->getTouched() ) ){
@@ -702,6 +700,7 @@
703701 }
704702 }
705703
 704+ $ns = $this->mTitle->getNamespace(); # shortcut
706705 $sk = $wgUser->getSkin();
707706
708707 # getOldID may want us to redirect somewhere else

Status & tagging log