Follow up r63584. The change of resetArticleID() could have all kinds of
authorPlatonides <platonides@users.mediawiki.org>
Fri, 18 Feb 2011 23:44:18 +0000 (23:44 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Fri, 18 Feb 2011 23:44:18 +0000 (23:44 +0000)
side effects, given that it stops lazy cache fillings.

includes/Article.php

index 40a2c4f..6504d3a 100644 (file)
@@ -1754,7 +1754,7 @@ class Article {
 
                if ( $affected ) {
                        $newid = $dbw->insertId();
-                       $this->mTitle->resetArticleId( $newid );
+                       $this->mTitle->resetArticleID( $newid );
                }
                wfProfileOut( __METHOD__ );
 
@@ -2271,6 +2271,8 @@ class Article {
                        $revisionId = $revision->insertOn( $dbw );
 
                        $this->mTitle->resetArticleID( $newid );
+                       # Update the LinkCache. Resetting the Title ArticleID means it will rely on having that already cached (FIXME?)
+                       LinkCache::singleton()->addGoodLinkObj( $newid, $this->mTitle, strlen( $text ), (bool)Title::newFromRedirect( $text ), $revisionId );
 
                        # Update the page record with revision data
                        $this->updateRevisionOn( $dbw, $revision, 0 );