function view() {
global $wgUser, $wgOut, $wgRequest, $wgOnlySysopsCanPatrol, $wgContLang;
global $wgEnableParserCache, $wgStylePath, $wgUseRCPatrol, $wgParser;
- global $wgParserCache, $wgUseTrackbacks;
+ global $wgUseTrackbacks;
$sk = $wgUser->getSkin();
$fname = 'Article::view';
wfProfileIn( $fname );
+ $parserCache =& ParserCache::singleton();
# Get variables from query string
$oldid = $this->getOldID();
}
if ( empty( $oldid ) && $this->checkTouched() ) {
- $wgOut->setETag($wgParserCache->getETag($this, $wgUser));
+ $wgOut->setETag($parserCache->getETag($this, $wgUser));
if( $wgOut->checkLastModified( $this->mTouched ) ){
wfProfileOut( $fname );
* @param string $text
*/
function editUpdates( $text, $summary, $minoredit, $timestamp_of_pagechange, $newid) {
- global $wgDeferredUpdateList, $wgMessageCache, $wgUser, $wgParser, $wgParserCache;
+ global $wgDeferredUpdateList, $wgMessageCache, $wgUser, $wgParser;
$fname = 'Article::editUpdates';
wfProfileIn( $fname );
$poutput = $wgParser->parse( $text, $this->mTitle, $options, true, true, $newid );
# Save it to the parser cache
- $wgParserCache->save( $poutput, $this, $wgUser );
+ $parserCache =& ParserCache::singleton();
+ $parserCache->save( $poutput, $this, $wgUser );
# Update the links tables
$u = new LinksUpdate( $this->mTitle, $poutput );
* Saves the text into the parser cache if possible
*/
function addPrimaryWikiText( $text, $article, $cache = true ) {
- global $wgParser, $wgParserCache, $wgUser;
+ global $wgParser, $wgUser;
$parserOutput = $wgParser->parse( $text, $article->mTitle,
$this->mParserOptions, true, true, $this->mRevisionId );
if ( $article && $parserOutput->getCacheTime() != -1 ) {
- $wgParserCache->save( $parserOutput, $article, $wgUser );
+ $parserCache =& ParserCache::singleton();
+ $parserCache->save( $parserOutput, $article, $wgUser );
}
$this->addParserOutput( $parserOutput );
* @return bool
*/
function tryParserCache( $article, $user ) {
- global $wgParserCache;
- $parserOutput = $wgParserCache->get( $article, $user );
+ $parserCache =& ParserCache::singleton();
+ $parserOutput = $parserCache->get( $article, $user );
if ( $parserOutput !== false ) {
$this->mLanguageLinks += $parserOutput->getLanguageLinks();
$this->addCategoryLinks( $parserOutput->getCategories() );