r113307 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113306‎ | r113307 | r113308 >
Date:21:45, 7 March 2012
Author:bsitu
Status:ok
Tags:
Comment:
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) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -356,11 +356,11 @@
357357
358358 $css = count( $classes ) ? ' class="' . implode( ' ', $classes ) . '"' : '';
359359
360 - # Display the old title if the namespace has been changed
 360+ # Display the old title if the namespace/title has been changed
361361 $oldTitleText = '';
362 - if ( $result->page_namespace !== $result->rc_namespace ) {
363 - $oldTitleText = wfMessage( 'rc-old-title' )->params( Title::makeTitle( $result->rc_namespace, $result->rc_title )
364 - ->getPrefixedText() )->escaped();
 362+ $oldTitle = Title::makeTitle( $result->rc_namespace, $result->rc_title );
 363+ if ( !$title->equals( $oldTitle ) ) {
 364+ $oldTitleText = wfMessage( 'rc-old-title' )->params( $oldTitle->getPrefixedText() )->escaped();
365365 }
366366
367367 return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}</li>\n";

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112918fix for bug34781 - display old title text if the namespace has been changedbsitu20:58, 2 March 2012

Status & tagging log