r87110 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87109‎ | r87110 | r87111 >
Date:00:48, 29 April 2011
Author:reedy
Status:deferred
Tags:
Comment:
Merge r70803, r70951
Modified paths:
  • /branches/iwtransclusion/phase3v2 (modified) (history)
  • /branches/iwtransclusion/phase3v2/includes/Article.php (modified) (history)
  • /branches/iwtransclusion/phase3v2/includes/BacklinkCache.php (modified) (history)

Diff [purge]

Index: branches/iwtransclusion/phase3v2/includes/Article.php
@@ -3938,6 +3938,8 @@
39393939 * @param $title Title object
39403940 */
39413941 public static function onArticleCreate( $title ) {
 3942+ global $wgDeferredUpdateList;
 3943+
39423944 # Update existence markers on article/talk tabs...
39433945 if ( $title->isTalkPage() ) {
39443946 $other = $title->getSubjectPage();
@@ -3951,6 +3953,9 @@
39523954 $title->touchLinks();
39533955 $title->purgeSquid();
39543956 $title->deleteTitleProtection();
 3957+
 3958+ # Invalidate caches of distant articles which transclude this page
 3959+ $wgDeferredUpdateList[] = new HTMLCacheUpdate( $title, 'globaltemplatelinks' );
39553960 }
39563961
39573962 /**
@@ -3959,6 +3964,8 @@
39603965 * @param $title Title
39613966 */
39623967 public static function onArticleDelete( $title ) {
 3968+ global $wgMessageCache, $wgDeferredUpdateList;
 3969+
39633970 # Update existence markers on article/talk tabs...
39643971 if ( $title->isTalkPage() ) {
39653972 $other = $title->getSubjectPage();
@@ -3994,6 +4001,9 @@
39954002
39964003 # Image redirects
39974004 RepoGroup::singleton()->getLocalRepo()->invalidateImageRedirect( $title );
 4005+
 4006+ # Invalidate caches of distant articles which transclude this page
 4007+ $wgDeferredUpdateList[] = new HTMLCacheUpdate( $title, 'globaltemplatelinks' );
39984008 }
39994009
40004010 /**
@@ -4010,7 +4020,6 @@
40114021
40124022 // Invalidate caches of distant articles which transclude this page
40134023 $wgDeferredUpdateList[] = new HTMLCacheUpdate( $title, 'globaltemplatelinks' );
4014 - wfDoUpdates();
40154024
40164025 // Invalidate the caches of all pages which redirect here
40174026 $wgDeferredUpdateList[] = new HTMLCacheUpdate( $title, 'redirect' );
Index: branches/iwtransclusion/phase3v2/includes/BacklinkCache.php
@@ -174,10 +174,7 @@
175175
176176 /**
177177 * Get the distant backtemplatelinks for the table globaltemplatelinks. Cached in process memory only.
178 - * @param $table String
179 - * @param $startId Integer or false
180 - * @param $endId Integer or false
181 - * @return TitleArray
 178+ * @return ResultWrapper list of distant pages that use the local title
182179 */
183180 public function getDistantTemplateLinks( ) {
184181 global $wgGlobalDatabase, $wgLocalInterwiki;
@@ -187,8 +184,7 @@
188185 array( 'globaltemplatelinks' ),
189186 array( 'gtl_from_wiki', 'gtl_from_page' ),
190187 array( 'gtl_to_prefix' => $wgLocalInterwiki, 'gtl_to_title' => $this->title->getDBkey( ) ),
191 - __METHOD__,
192 - 'GROUP BY gtl_from_wiki'
 188+ __METHOD__
193189 );
194190 return $res;
195191 }
Property changes on: branches/iwtransclusion/phase3v2
___________________________________________________________________
Modified: svn:mergeinfo
196192 Merged /branches/iwtransclusion/phase3:r70951

Follow-up revisions

RevisionCommit summaryAuthorDate
r92995Merge r87110, Merge of r70803, r70951reedy18:22, 24 July 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70803Fix remarks about r70802peter1709:30, 10 August 2010
r70951Invalidate the cache of distant pages when local templates are created/delete...peter1713:30, 12 August 2010

Status & tagging log