https://www.mediawiki.org/wiki/Special:Code/MediaWiki/112918
Revision: 112918
Author: bsitu
Date: 2012-03-02 20:58:10 +0000 (Fri, 02 Mar 2012)
Log Message:
-----------
fix for bug34781 - display old title text if the namespace has been changed
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialNewpages.php
trunk/phase3/languages/messages/MessagesEn.php
trunk/phase3/languages/messages/MessagesQqq.php
Modified: trunk/phase3/includes/specials/SpecialNewpages.php
===================================================================
--- trunk/phase3/includes/specials/SpecialNewpages.php 2012-03-02 20:48:09 UTC
(rev 112917)
+++ trunk/phase3/includes/specials/SpecialNewpages.php 2012-03-02 20:58:10 UTC
(rev 112918)
@@ -356,7 +356,14 @@
$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";
}
/**
Modified: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php 2012-03-02 20:48:09 UTC
(rev 112917)
+++ trunk/phase3/languages/messages/MessagesEn.php 2012-03-02 20:58:10 UTC
(rev 112918)
@@ -2073,6 +2073,7 @@
'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',
Modified: trunk/phase3/languages/messages/MessagesQqq.php
===================================================================
--- trunk/phase3/languages/messages/MessagesQqq.php 2012-03-02 20:48:09 UTC
(rev 112917)
+++ trunk/phase3/languages/messages/MessagesQqq.php 2012-03-02 20:58:10 UTC
(rev 112918)
@@ -1789,6 +1789,7 @@
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]].',
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs