Move log log_page entries are now that of the moved page

bug: 57084
Change-Id: Ibc20d79093eedcdaba1873861e177ca3a6108bca
This commit is contained in:
Aaron Schulz 2014-09-02 12:59:18 -07:00
parent da83f3e91b
commit 9372c87888
2 changed files with 7 additions and 3 deletions

View file

@ -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

View file

@ -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 );