r43672 - Code Review

From MediaWiki.org

Jump to: navigation, search
Repository:MediaWiki
Revision:r43671 | r43672 (on ViewVC) | r43673 >
Date:12:54, 18 November 2008
Author:raymond
Status:ok
Tags:
Comment:* (bug 11728) Unify layout of enhanced watchlist/recent changes:
Changed from:
Time Page (4 changes) . . (+bytes) . . (hist) [list of editors]
To:
Time Page (4 changes; hist) . . (+bytes) . . [list of editors]

Use consistent message for the history link
Patch by Mormegil
Modified paths:

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
===================================================================
--- trunk/phase3/includes/ChangesList.php	(revision 43671)
+++ trunk/phase3/includes/ChangesList.php	(revision 43672)
@@ -692,9 +692,19 @@
 				$r .= $this->skin->makeKnownLinkObj( $block[0]->getTitle(),
 					$nchanges[$n], $curIdEq."&diff=$currentRevision&oldid=$oldid" );
 			}
-			$r .= ') . . ';
 		}
 
+		# History
+		if( $alllogs ) {
+			// don't show history link for logs
+		} else if( $namehidden || !$block[0]->getTitle()->exists() ) {
+			$r .= $this->message['semicolon-separator'] . $this->message['hist'] . ')';
+		} else {
+			$r .= $this->message['semicolon-separator'] . $this->skin->makeKnownLinkObj( $block[0]->getTitle(),
+				$this->message['hist'], $curIdEq . '&action=history' ) . ')';
+		}
+		$r .= ' . . ';
+
 		# Character difference (does not apply if only log items)
 		if( $wgRCShowChangedSize && !$alllogs ) {
 			$last = 0;
@@ -717,16 +727,6 @@
 			}
 		}
 
-		# History
-		if( $alllogs ) {
-			// don't show history link for logs
-		} else if( $namehidden || !$block[0]->getTitle()->exists() ) {
-			$r .= '(' . $this->message['history'] . ')';
-		} else {
-			$r .= '(' . $this->skin->makeKnownLinkObj( $block[0]->getTitle(),
-				$this->message['history'], $curIdEq.'&action=history' ) . ')';
-		}
-
 		$r .= $users;
 		$r .= $this->numberofWatchingusers($block[0]->numberofWatchingusers);
 
@@ -892,7 +892,7 @@
 
 		# Character diff
 		if( $wgRCShowChangedSize ) {
-			$r .= ( $rcObj->getCharacterDifference() == '' ? '' : ' ' . $rcObj->getCharacterDifference() . ' . . ' ) ;
+			$r .= ( $rcObj->getCharacterDifference() == '' ? '' : $rcObj->getCharacterDifference() . ' . . ' ) ;
 		}
 
 		# User/talk
Index: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES	(revision 43671)
+++ trunk/phase3/RELEASE-NOTES	(revision 43672)
@@ -356,6 +356,7 @@
   installations.
 * Improved scripting safety heuristics for IE 5/6 content-type detection.
 * Improved scripting safety heuristics on SVG uploads.
+* (bug 11728) Unify layout of enhanced watchlist/recent changes
 
 === API changes in 1.14 ===
 

Status & tagging log

Views
Toolbox