r28136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28135‎ | r28136 | r28137 >
Date:10:56, 4 December 2007
Author:raymond
Status:old
Tags:
Comment:
* Add descriptive <title> to revision difference page
* Move message 'difference' in language files to recentchanges section as it is only used in RecentChanges.php now.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DifferenceEngine.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesDe.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -640,7 +640,7 @@
641641 ),
642642 'diffs' => array(
643643 'history-title',
644 - 'difference',
 644+ 'difference-title',
645645 'loadingrev',
646646 'lineno',
647647 'editcurrent',
@@ -803,6 +803,7 @@
804804 'rc_categories_any',
805805 'rc-change-size',
806806 'newsectionsummary',
 807+ 'difference',
807808 ),
808809 'recentchangeslinked' => array(
809810 'recentchangeslinked',
Index: trunk/phase3/includes/DifferenceEngine.php
@@ -72,6 +72,10 @@
7373 $this->mRefreshCache = $refreshCache;
7474 }
7575
 76+ /**
 77+ * Show difference between revisions
 78+ * @param $diffOnly bool show the difference only, no preview
 79+ */
7680 function showDiffPage( $diffOnly = false ) {
7781 global $wgUser, $wgOut, $wgUseExternalEditor, $wgUseRCPatrol;
7882 $fname = 'DifferenceEngine::showDiffPage';
@@ -126,6 +130,7 @@
127131 # a diff between a version V and its previous version V' AND the version V
128132 # is the first version of that article. In that case, V' does not exist.
129133 if ( $this->mOldid === false ) {
 134+ $wgOut->setPageTitle( wfMsg( 'difference-title', $this->mTitle->getPrefixedText() ) );
130135 $this->showFirstRevision();
131136 $this->renderNewRevision(); // should we respect $diffOnly here or not?
132137 wfProfileOut( $fname );
@@ -137,11 +142,10 @@
138143 $oldTitle = $this->mOldPage->getPrefixedText();
139144 $newTitle = $this->mNewPage->getPrefixedText();
140145 if( $oldTitle == $newTitle ) {
141 - $wgOut->setPageTitle( $newTitle );
 146+ $wgOut->setPageTitle( wfMsg( 'difference-title', $newTitle ) );
142147 } else {
143 - $wgOut->setPageTitle( $oldTitle . ', ' . $newTitle );
 148+ $wgOut->setPageTitle( wfMsg( 'difference-title', $oldTitle . ', ' . $newTitle ) );
144149 }
145 - $wgOut->setSubtitle( wfMsg( 'difference' ) );
146150 $wgOut->setRobotpolicy( 'noindex,nofollow' );
147151
148152 if ( !( $this->mOldPage->userCanRead() && $this->mNewPage->userCanRead() ) ) {
@@ -366,7 +370,6 @@
367371
368372 $wgOut->addHTML( $header );
369373
370 - $wgOut->setSubtitle( wfMsg( 'difference' ) );
371374 $wgOut->setRobotpolicy( 'noindex,nofollow' );
372375
373376 wfProfileOut( $fname );
@@ -2012,6 +2015,3 @@
20132016 wfProfileOut( $fname );
20142017 }
20152018 }
2016 -
2017 -
2018 -
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1216,7 +1216,7 @@
12171217
12181218 # Diffs
12191219 'history-title' => 'Revision history of "$1"',
1220 -'difference' => '(Difference between revisions)',
 1220+'difference-title' => 'Difference between revisions of "$1"',
12211221 'loadingrev' => 'loading revision for diff',
12221222 'lineno' => 'Line $1:',
12231223 'editcurrent' => 'Edit the current version of this page',
@@ -1394,6 +1394,7 @@
13951395 'rc_categories_any' => 'Any',
13961396 'rc-change-size' => '$1', # only translate this message to other languages if you have to change it
13971397 'newsectionsummary' => '/* $1 */ new section',
 1398+'difference' => '(Difference between revisions)',
13981399
13991400 # Recent changes linked
14001401 'recentchangeslinked' => 'Related changes',
Index: trunk/phase3/languages/messages/MessagesDe.php
@@ -877,7 +877,7 @@
878878
879879 # Diffs
880880 'history-title' => 'Versionsgeschichte von „$1“',
881 -'difference' => '(Unterschied zwischen Versionen)',
 881+'difference-title' => 'Versionsunterschied: „$1“',
882882 'loadingrev' => 'Lade Versionen zur Unterscheidung',
883883 'lineno' => 'Zeile $1:',
884884 'editcurrent' => 'Die aktuelle Version dieser Seite bearbeiten',
@@ -1040,6 +1040,7 @@
10411041 'rc_categories_any' => 'Alle',
10421042 'rc-change-size' => '$1 {{PLURAL:$1|Byte|Bytes}}',
10431043 'newsectionsummary' => 'Neuer Abschnitt /* $1 */',
 1044+'difference' => '(Unterschied zwischen Versionen)',
10441045
10451046 # Recent changes linked
10461047 'recentchangeslinked' => 'Änderungen an verlinkten Seiten',
Index: trunk/phase3/RELEASE-NOTES
@@ -86,6 +86,7 @@
8787 * Show a warning message when creating/editing a user (talk) page but the user
8888 does not exists
8989 * (bug 8396) Ignore out-of-date serialised message caches
 90+* Add descriptive <title> to revision difference page
9091
9192 === Bug fixes in 1.12 ===
9293

Follow-up revisions

RevisionCommit summaryAuthorDate
r28153Revert r28136; overlong title prefix obscures page title in tabs, window list...brion20:47, 4 December 2007

Status & tagging log