// The parser needs $wgTitle to be set, apparently the
// $title parameter in Parser::parse isn't enough *sigh*
- global $wgParser, $wgUser, $wgTitle;
+ global $wgParser, $wgUser, $wgTitle, $wgEnableParserCache;
$popts = new ParserOptions();
$popts->setTidy(true);
$popts->enableLimitReport();
if(isset($prop['revid']))
$oldid = $articleObj->getRevIdFetched();
// Try the parser cache first
+ $p_result = false;
$pcache = ParserCache::singleton();
- $p_result = $pcache->get($articleObj, $wgUser);
+ if($wgEnableParserCache)
+ $p_result = $pcache->get($articleObj, $wgUser);
if(!$p_result)
{
$p_result = $wgParser->parse($articleObj->getContent(), $titleObj, $popts);
- global $wgUseParserCache;
- if($wgUseParserCache)
+
+ if($wgEnableParserCache)
$pcache->save($p_result, $articleObj, $popts);
}
}