From 6d372793c0a2fd926aef18ac834fc48a6f55f606 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 14 Mar 2004 03:02:42 +0000 Subject: [PATCH] Fix sourceforge bug 600079 Allow to move a talk page if an article is moved across different namespace (unless the new namespace is itself a talk page) --- includes/SpecialMovepage.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php index ad66cb188e..c1aac6a392 100644 --- a/includes/SpecialMovepage.php +++ b/includes/SpecialMovepage.php @@ -184,15 +184,22 @@ class MovePageForm { } - # Move talk page if (1) the checkbox says to, (2) the source - # and target namespaces are identical, (3) the namespaces are not - # themselves talk namespaces, and of course (4) it exists. + # Move talk page if + # (1) the checkbox says to, + # (2) the namespaces are not themselves talk namespaces, and of course + # (3) it exists. if ( ( 1 == $_REQUEST['wpMovetalk'] ) && - ( ! Namespace::isTalk( $this->ons ) ) && - ( $this->ons == $this->nns ) ) { + ( ! Namespace::isTalk( $this->ons ) ) && + ( ! Namespace::isTalk( $this->nns ) ) ) { - $this->ons = $this->nns = Namespace::getTalk( $this->ons ); + # get old talk page namespace + $this->ons = Namespace::getTalk( $this->ons ); + # get new talk page namespace + $this->nns = Namespace::getTalk( $this->nns ); + + + # grab the newer title objects $this->ot = Title::makeTitle( $this->ons, $this->ot->getDBkey() ); $this->nt = Title::makeTitle( $this->nns, $this->nt->getDBkey() ); -- 2.20.1