r55266 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55265‎ | r55266 | r55267 >
Date:20:28, 18 August 2009
Author:catrope
Status:ok
Tags:
Comment:
Untested equivalent of r55262 ("When moving a page to a subpage of itself, don't move the root page twice") for Title::moveSubpages(). SpecialMovepage should be refactored to use Title::moveSubpages() some day.
Modified paths:
  • /trunk/phase3/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Title.php
@@ -3074,7 +3074,11 @@
30753075 break;
30763076 }
30773077
3078 - if( $oldSubpage->getArticleId() == $this->getArticleId() )
 3078+ // We don't know whether this function was called before
 3079+ // or after moving the root page, so check both
 3080+ // $this and $nt
 3081+ if( $oldSubpage->getArticleId() == $this->getArticleId() ||
 3082+ $oldSubpage->getArticleID() == $nt->getArticleId() )
30793083 // When moving a page to a subpage of itself,
30803084 // don't move it twice
30813085 continue;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r55262Don't move twice when moving subpages to a subpage...simetrical20:13, 18 August 2009

Status & tagging log