Avoid using the deprecated ParserCache::singleton()
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index bf8a597..312edbd 100644 (file)
@@ -1070,7 +1070,8 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                if ( $useParserCache ) {
-                       $parserOutput = ParserCache::singleton()->get( $this, $parserOptions );
+                       $parserOutput = MediaWikiServices::getInstance()->getParserCache()
+                               ->get( $this, $parserOptions );
                        if ( $parserOutput !== false ) {
                                return $parserOutput;
                        }
@@ -2162,7 +2163,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Save it to the parser cache.
                // Make sure the cache time matches page_touched to avoid double parsing.
-               ParserCache::singleton()->save(
+               MediaWikiServices::getInstance()->getParserCache()->save(
                        $editInfo->output, $this, $editInfo->popts,
                        $revision->getTimestamp(), $editInfo->revid
                );