Merge "Avoid deprecated LinkCache::singleton()"
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 24a7059..5bbdb6c 100644 (file)
@@ -527,7 +527,7 @@ class WikiPage implements Page, IDBAccessObject {
         *          the master DB using SELECT FOR UPDATE
         */
        public function loadFromRow( $data, $from ) {
-               $lc = LinkCache::singleton();
+               $lc = MediaWikiServices::getInstance()->getLinkCache();
                $lc->clearLink( $this->mTitle );
 
                if ( $data ) {
@@ -1367,7 +1367,8 @@ class WikiPage implements Page, IDBAccessObject {
                        $this->mLatest = $revision->getId();
                        $this->mIsRedirect = (bool)$rt;
                        // Update the LinkCache.
-                       LinkCache::singleton()->addGoodLinkObj(
+                       $linkCache = MediaWikiServices::getInstance()->getLinkCache();
+                       $linkCache->addGoodLinkObj(
                                $this->getId(),
                                $this->mTitle,
                                $len,