(bug 24668) Followup to r48165: code accounting for pages being moved OUT of the...
authorRoan Kattouw <catrope@users.mediawiki.org>
Thu, 5 Aug 2010 15:37:21 +0000 (15:37 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Thu, 5 Aug 2010 15:37:21 +0000 (15:37 +0000)
includes/Title.php

index e376077..9bb6f83 100644 (file)
@@ -3135,9 +3135,8 @@ class Title {
                        $u->doUpdate();
                }
                # Update message cache for interface messages
-               if ( $nt->getNamespace() == NS_MEDIAWIKI ) {
-                       global $wgMessageCache;
-
+               global $wgMessageCache;
+               if ( $this->getNamespace() == NS_MEDIAWIKI ) {
                        # @bug 17860: old article can be deleted, if this the case,
                        # delete it from message cache
                        if ( $this->getArticleID() === 0 ) {
@@ -3146,7 +3145,8 @@ class Title {
                                $oldarticle = new Article( $this );
                                $wgMessageCache->replace( $this->getDBkey(), $oldarticle->getContent() );
                        }
-
+               }
+               if ( $nt->getNamespace() == NS_MEDIAWIKI ) {
                        $newarticle = new Article( $nt );
                        $wgMessageCache->replace( $nt->getDBkey(), $newarticle->getContent() );
                }