From: Alexandre Emsenhuber Date: Wed, 26 Jun 2013 20:02:27 +0000 (+0200) Subject: (bug 49840) Moving a page with subpages may lead in the page being moved twice X-Git-Tag: 1.31.0-rc.0~19345^2 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=517da806a7ae0f64169eb1d76e1fb5e7baaf3619;p=lhc%2Fweb%2Fwiklou.git (bug 49840) Moving a page with subpages may lead in the page being moved twice This happens if a page is moved to a subpage of itself and the option "move subpages" is enabled, since the freshly moved page will be found as being one of its subpages and moved a second time as such. Bug: 49840 Change-Id: I318aab8c3c6e7ae718a3366ab00aba6e5420529b --- diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index 2ba3c0660f..ccc2bf26f0 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -624,7 +624,7 @@ class MovePageForm extends UnlistedSpecialPage { $extraOutput = array(); $count = 1; foreach ( $extraPages as $oldSubpage ) { - if ( $ot->equals( $oldSubpage ) ) { + if ( $ot->equals( $oldSubpage ) || $nt->equals( $oldSubpage ) ) { # Already did this one. continue; }