From 69dffda7f96f90dc91a36d8a8475d1f01f2df21d Mon Sep 17 00:00:00 2001 From: Benny Situ Date: Wed, 7 Mar 2012 21:45:38 +0000 Subject: [PATCH] followup to -r112918 - display old title in SpecialNews page when namespace or title text has been changed --- includes/specials/SpecialNewpages.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 54bcb97f44..6256b086d9 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -356,11 +356,11 @@ class SpecialNewpages extends IncludableSpecialPage { $css = count( $classes ) ? ' class="' . implode( ' ', $classes ) . '"' : ''; - # Display the old title if the namespace has been changed + # Display the old title if the namespace/title has been changed $oldTitleText = ''; - if ( $result->page_namespace !== $result->rc_namespace ) { - $oldTitleText = wfMessage( 'rc-old-title' )->params( Title::makeTitle( $result->rc_namespace, $result->rc_title ) - ->getPrefixedText() )->escaped(); + $oldTitle = Title::makeTitle( $result->rc_namespace, $result->rc_title ); + if ( !$title->equals( $oldTitle ) ) { + $oldTitleText = wfMessage( 'rc-old-title' )->params( $oldTitle->getPrefixedText() )->escaped(); } return "{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}\n"; -- 2.20.1