http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72866

Revision: 72866
Author:   demon
Date:     2010-09-12 15:39:32 +0000 (Sun, 12 Sep 2010)

Log Message:
-----------
(bug 24007) Diff pages now mention the number of users having edited 
intermediate revisions. Also updated MessagesQqq so these are a little more 
clear

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES
    trunk/phase3/includes/diff/DifferenceInterface.php
    trunk/phase3/languages/messages/MessagesEn.php
    trunk/phase3/languages/messages/MessagesQqq.php
    trunk/phase3/maintenance/language/messages.inc

Modified: trunk/phase3/RELEASE-NOTES
===================================================================
--- trunk/phase3/RELEASE-NOTES  2010-09-12 15:32:30 UTC (rev 72865)
+++ trunk/phase3/RELEASE-NOTES  2010-09-12 15:39:32 UTC (rev 72866)
@@ -148,6 +148,8 @@
 * The parser cache is now shared amongst users whose different settings aren't
   used in the page.
 * Any attribute beginning with "data-" can now be used in wikitext, per HTML5.
+* (bug 24007) Diff pages now mention the number of users having edited
+  intermediate revisions
 
 === Bug fixes in 1.17 ===
 * (bug 17560) Half-broken deletion moved image files to deletion archive

Modified: trunk/phase3/includes/diff/DifferenceInterface.php
===================================================================
--- trunk/phase3/includes/diff/DifferenceInterface.php  2010-09-12 15:32:30 UTC 
(rev 72865)
+++ trunk/phase3/includes/diff/DifferenceInterface.php  2010-09-12 15:39:32 UTC 
(rev 72866)
@@ -812,10 +812,24 @@
                }
 
                $n = $this->mTitle->countRevisionsBetween( $oldid, $newid );
-               if ( !$n )
+               if ( !$n ) {
                        return '';
-
-               return wfMsgExt( 'diff-multi', array( 'parseinline' ), $n );
+               } else {
+                       global $wgLang;
+                       $dbr = wfGetDB( DB_SLAVE );
+                       $res = $dbr->select( 'revision', 'DISTINCT 
rev_user_text',
+                               array(
+                                       'rev_page = ' . 
$this->mOldRev->getPage(),
+                                       'rev_id > ' . $this->mOldRev->getId(),
+                                       'rev_id < ' . $this->mNewRev->getId()
+                               ), __METHOD__,
+                               array( 'LIMIT' => 101 )
+                       );
+                       $numUsers = $dbr->numRows( $res );
+                       $msg = $numUsers > 100 ? 'diff-multi-manyusers' : 
'diff-multi';
+                       return wfMsgExt( $msg, array( 'parseinline' ), 
$wgLang->formatnum( $n ),
+                               $wgLang->formatnum( $numUsers ) );
+               }
        }
 
 

Modified: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php      2010-09-12 15:32:30 UTC 
(rev 72865)
+++ trunk/phase3/languages/messages/MessagesEn.php      2010-09-12 15:39:32 UTC 
(rev 72866)
@@ -1617,7 +1617,8 @@
 'compareselectedversions'  => 'Compare selected revisions',
 'showhideselectedversions' => 'Show/hide selected revisions',
 'editundo'                 => 'undo',
-'diff-multi'               => '({{PLURAL:$1|One intermediate revision|$1 
intermediate revisions}} not shown)',
+'diff-multi'               => '({{PLURAL:$1|One intermediate revision|$1 
intermediate revisions}} by {{PLURAL:$2|one user|$2 users}} not shown)',
+'diff-multi-manyusers'     => '($1 intermediate revisions intermediate 
revisions by 100+ users not shown)',
 
 # Search results
 'search-summary'                   => '', # do not translate or duplicate this 
message to other languages

Modified: trunk/phase3/languages/messages/MessagesQqq.php
===================================================================
--- trunk/phase3/languages/messages/MessagesQqq.php     2010-09-12 15:32:30 UTC 
(rev 72865)
+++ trunk/phase3/languages/messages/MessagesQqq.php     2010-09-12 15:39:32 UTC 
(rev 72866)
@@ -1154,8 +1154,14 @@
 'showhideselectedversions' => 'Text of the button which brings up the 
[[mw:RevisionDelete|RevisionDelete]] menu.',
 'editundo'                 => 'Undo link when viewing diffs
 {{Identical|Undo}}',
-'diff-multi'               => "This message appears in the revision history of 
a page when comparing two versions which aren't consecutive.",
+'diff-multi'               => "This message appears in the revision history of 
a page when comparing two versions which aren't consecutive.
 
+*Parameter $1 is the number of revisions
+*Parameter $2 is the number of users making those revisions",
+'diff-multi-manyuser'      => "This message appears in the revision history of 
a page when comparing two versions which aren't consecutive, and the 
intermediate revisions have been edited by 100+ users
+
+*$1 is the number of revisions, will always be 100 or more",
+
 # Search results
 'searchresults-title'            => 'Appears as page title in the html header 
of the search result special page.',
 'notitlematches'                 => 'Header of results page after a search for 
a title for which no page exists',

Modified: trunk/phase3/maintenance/language/messages.inc
===================================================================
--- trunk/phase3/maintenance/language/messages.inc      2010-09-12 15:32:30 UTC 
(rev 72865)
+++ trunk/phase3/maintenance/language/messages.inc      2010-09-12 15:39:32 UTC 
(rev 72866)
@@ -804,6 +804,7 @@
                'showhideselectedversions',
                'editundo',
                'diff-multi',
+               'diff-multi-manyusers',
        ),
        'search' => array(
                'search-summary',



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to