(bug 24007) Diff pages now mention the number of users having edited intermediate...
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 12 Sep 2010 15:39:32 +0000 (15:39 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 12 Sep 2010 15:39:32 +0000 (15:39 +0000)
RELEASE-NOTES
includes/diff/DifferenceInterface.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index 710a7e6..0e655e7 100644 (file)
@@ -148,6 +148,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * 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
index 64975bb..d447ed9 100644 (file)
@@ -812,10 +812,24 @@ CONTROL;
                }
 
                $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 ) );
+               }
        }
 
 
index 5810916..4e79da4 100644 (file)
@@ -1617,7 +1617,8 @@ Note that using the navigation links will reset this column.',
 '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
index f234df8..4b711a1 100644 (file)
@@ -1154,7 +1154,13 @@ See also {{msg-mw|difference}}.',
 '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.',
index 055957a..6727461 100644 (file)
@@ -804,6 +804,7 @@ $wgMessageStructure = array(
                'showhideselectedversions',
                'editundo',
                'diff-multi',
+               'diff-multi-manyusers',
        ),
        'search' => array(
                'search-summary',