From: Aaron Schulz Date: Tue, 2 Sep 2014 19:59:18 +0000 (-0700) Subject: Move log log_page entries are now that of the moved page X-Git-Tag: 1.31.0-rc.0~14152^2 X-Git-Url: https://git.heureux-cyclage.org/?a=commitdiff_plain;h=9372c87888faee69240c7ae641d4aabd1d9dfd13;hp=da83f3e91b4eb7de1a8f8101a03538671cc5256b;p=lhc%2Fweb%2Fwiklou.git Move log log_page entries are now that of the moved page bug: 57084 Change-Id: Ibc20d79093eedcdaba1873861e177ca3a6108bca --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index c5b6cd45fd..bdf9a11390 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -434,6 +434,8 @@ changes to languages because of Bugzilla reports. called unconditionally. * TablePager::getBody() is now 'final' and can't be overridden in subclasses. * TablePager::getBody() is deprecated, use getBodyOutput() or getFullOutput(). +* log_page for move log entries store the original page ID, rather than that + of the new redirect page. This is not retroactive. ==== Renamed classes ==== * CLDRPluralRuleConverter_Expression to CLDRPluralRuleConverterExpression diff --git a/includes/Title.php b/includes/Title.php index 7fdeb05511..ca292eefcf 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3931,9 +3931,13 @@ class Title { $redirectContent = null; } + // bug 57084: log_page should be the ID of the *moved* page + $oldid = $this->getArticleID(); + $logTitle = clone $this; + $logEntry = new ManualLogEntry( 'move', $logType ); $logEntry->setPerformer( $wgUser ); - $logEntry->setTarget( $this ); + $logEntry->setTarget( $logTitle ); $logEntry->setComment( $reason ); $logEntry->setParameters( array( '4::target' => $nt->getPrefixedText(), @@ -3949,8 +3953,6 @@ class Title { # Truncate for whole multibyte characters. $comment = $wgContLang->truncate( $comment, 255 ); - $oldid = $this->getArticleID(); - $dbw = wfGetDB( DB_MASTER ); $newpage = WikiPage::factory( $nt );