https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113307
Revision: 113307
Author: bsitu
Date: 2012-03-07 21:45:38 +0000 (Wed, 07 Mar 2012)
Log Message:
-----------
followup to -r112918 - display old title in SpecialNews page when namespace or
title text has been changed
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialNewpages.php
Modified: trunk/phase3/includes/specials/SpecialNewpages.php
===================================================================
--- trunk/phase3/includes/specials/SpecialNewpages.php 2012-03-07 21:41:53 UTC
(rev 113306)
+++ trunk/phase3/includes/specials/SpecialNewpages.php 2012-03-07 21:45:38 UTC
(rev 113307)
@@ -356,11 +356,11 @@
$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 "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length}
{$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}</li>\n";
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs