fix for bug34781 - display old title text if the namespace has been changed
authorBenny Situ <bsitu@users.mediawiki.org>
Fri, 2 Mar 2012 20:58:10 +0000 (20:58 +0000)
committerBenny Situ <bsitu@users.mediawiki.org>
Fri, 2 Mar 2012 20:58:10 +0000 (20:58 +0000)
includes/specials/SpecialNewpages.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php

index ecec87d..54bcb97 100644 (file)
@@ -356,7 +356,14 @@ class SpecialNewpages extends IncludableSpecialPage {
 
                $css = count( $classes ) ? ' class="' . implode( ' ', $classes ) . '"' : '';
 
-               return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay}</li>\n";
+               # Display the old title if the namespace 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();    
+               }
+
+               return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}</li>\n";
        }
 
        /**
index 9ef85bf..32af62a 100644 (file)
@@ -2073,6 +2073,7 @@ Your e-mail address is not revealed when other users contact you.',
 'newsectionsummary'                 => '/* $1 */ new section',
 'rc-enhanced-expand'                => 'Show details (requires JavaScript)',
 'rc-enhanced-hide'                  => 'Hide details',
+'rc-old-title'                      => 'originally created as "$1"',
 
 # Recent changes linked
 'recentchangeslinked'          => 'Related changes',
index 3c71f58..f64bd66 100644 (file)
@@ -1789,6 +1789,7 @@ I guess that this should appear before an input box where you can specify that r
 Does not work under $wgMiserMode ([[mwr:48986|r48986]]).',
 'rc-change-size-new'              => 'Tooltip when hovering a change list diff size. The tooltip shows the resulting new size in bytes.',
 'newsectionsummary'               => 'Default summary when adding a new section to a page.',
+'rc-old-title'                    => 'Text that shows the original title of a page, $1 is the original title text',
 
 # Recent changes linked
 'recentchangeslinked'         => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].',