r48165 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48164‎ | r48165 | r48166 >
Date:17:15, 8 March 2009
Author:ialex
Status:ok
Tags:
Comment:
(bug 17860) Moving a page in the "MediaWiki" namespace using SuppressRedirect no longer corrupts the message cache
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -2760,8 +2760,16 @@
27612761 # Update message cache for interface messages
27622762 if( $nt->getNamespace() == NS_MEDIAWIKI ) {
27632763 global $wgMessageCache;
2764 - $oldarticle = new Article( $this );
2765 - $wgMessageCache->replace( $this->getDBkey(), $oldarticle->getContent() );
 2764+
 2765+ # @bug 17860: old article can be deleted, if this the case,
 2766+ # delete it from message cache
 2767+ if ( $this->getArticleID === 0 ) {
 2768+ $wgMessageCache->replace( $this->getDBkey(), false );
 2769+ } else {
 2770+ $oldarticle = new Article( $this );
 2771+ $wgMessageCache->replace( $this->getDBkey(), $oldarticle->getContent() );
 2772+ }
 2773+
27662774 $newarticle = new Article( $nt );
27672775 $wgMessageCache->replace( $nt->getDBkey(), $newarticle->getContent() );
27682776 }
Index: trunk/phase3/RELEASE-NOTES
@@ -249,6 +249,8 @@
250250 * (bug 17799) Special:Random no longer throws a database error when a non-
251251 namespace is given, silently falls back to NS_MAIN
252252 * (bug 17751) The message for bad titles in WantedPages is now localized
 253+* (bug 17860) Moving a page in the "MediaWiki" namespace using SuppressRedirect
 254+ no longer corrupts the message cache
253255
254256 == API changes in 1.15 ==
255257 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Follow-up revisions

RevisionCommit summaryAuthorDate
r70504(bug 24668) Followup to r48165: code accounting for pages being moved OUT of ...catrope15:37, 5 August 2010

Status & tagging log